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

[REBOL] Re: Newbie Q: Cropping text

From: brett:codeconscious at: 4-Jul-2002 18:15

To Matt: There is also:
>> parse/all "asdfghjkl" [copy text 3 skip to end]
== true
>> probe text
"asd" == "asd" To Charles: copy/part at series 2 next at series 5 copy at series 3 remove/part at series 2 next at series 5 remove at series 3
> 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? 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. 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). 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. Regards, Brett.