Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Newbie Q: Cropping text

From: chalz:earthlink at: 7-Jul-2002 23:56

> To Charles: > > > Personally, I have a hard time working with > > series! with next and skip and tail and so forth. > > A pointer to a list element which I cannot see irritates me. > > I don't understand what you mean. That is, what do mean by see?
For instance, in C, I would have something like int idx; wherein I could use array[idx]; and move around by increasing and decreasing the index marker. How can I optically see where 'next will put me without evaluating it? How can I find out where REBOL believes itself to be in a series! ? Does REBOL think it's at the first value, the second, the third, etc? How can I find out?
> I suppose you could say that REBOL does not make pointers an explicit > datatype, and I reckon that is a good thing. It is good because > pointers are often easily mishandled and cause nasty memory errors. Not > only that but they are a difficult concept to learn in the first place.
Oddly enough, my first encounter with C was at WPI in Worcester, MA, in a programming class in which we were taught C. Once I got used to * and &, I honestly had no trouble with pointers. Well, understanding them. Zipping along and hitting '&' by accident when I wanted '*' occurred and such, but still...
> However, pointers are a useful concept with great flexibility. REBOL > maintains that flexibility in the series! datatype while at the same > time avoiding the problems that pointers have. It does it by > abstracting the pointer concept through providing a reference and > operations on the reference. This frees us as REBOL users from having > to know about the underlying physical storage - a wonderful thing. We > can forget about pointers too (unless you have to talk to a C DLL).
Well, since I don't have /Command, that is a moot point ;) Still, I like to know where REBOL is, or thinks it is. I like to be able to have some sort of index instantly available to me like that. Yes, I know, I can use pick series 3, but when I use 'next and 'skip and whatnot.... I get lost. And when REBOL modifies the source data when I really only wanted to look, that irritates me to death, especially when I'm still learning such manipulations.
> I admit that my learning about REBOL series was intially a bit hard > too. After a while it became more natural to me. One issue for me was > the two aspects of series: (a) they store a sequence of items (b) they > have a current index. These two aspects allow you to think of series > in two ways (a) the whole of a sequence (b) a position within a > sequence. Now I find I think in terms of (a) or (b) according to what > is more appropriate for my task. Much better than being limited to one > way of thinking. Sometimes the words I use reflect which of the two > aspect I'm thinking in E.g (a) Accounts, site-list (b) current-position.
I'm still going to have to work on this more. I can see very often where REBOL is easier, particularly for new coders to learn. But it strikes me that people who've been coding for a while in languages like C run up against brick walls. ;) And I never ever liked using <> to mean "not equal". :P Thanks for your help, Brett. --Charles