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

[REBOL] Re: Finding all objects derived from a specific object.

From: anton::wilddsl::net::au at: 1-Nov-2006 21:02

Wayne, Glad to be of assistence. Yes, blocks load more directly into rebol. By that I mean it's easy to write just [] which loads as a block!, rather than having to write make list! [] all over the place. So your code will be more concise and easier to read when using blocks. Trust me, we all use blocks 99% of the time. List!s and block!s have different time characterstics for each supported operation (insert, remove, etc.). I can't remember the details, because it's never been an issue for me, however a quick search on google for: list block insert remove "constant time" rebol found me this page: http://www.rebol.org/cgi-bin/cgiwrap/rebol/ml-display-message.r?m=rmlMFRQ There have been discussions on this subject in the past, try rebol.org mail list search some more, should yield more detail. list! also behaves a bit differently than other series! with regard to INSERT; Using INSERT moves the list series index to the end of the inserted data. Which can be confusing, eg: list: make list! ["b"] insert list "a" list ;== make list! ["b"] ; <-- what ? head list ;== make list! ["a" "b"] ; <-- oh, I see list: head list ; <-- let's fix it permanently Compare to block (and other series): blk: copy ["b"] insert blk "a" blk ;== ["a" "b"] ; <-- ok, series index is still at the head There might be other differences as for INSERT. I don't know, I don't use list at all. Regards, Anton.