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

[REBOL] Re: How to remove the last item of a serie ?

From: g:santilli:tiscalinet:it at: 6-May-2002 11:05

Hi Jason, On Sunday, May 05, 2002, 9:30:04 PM, you wrote: JC> cool.. So why can't I also use a similar syntax to do
>>> remove tail test -2
remove skip tail test -2 JC> Can you elaborate on that a little please. Most scripting languages are rather slow even if they can be compiled. Java is rather slow even with the JIT compiler. Why? Because there's a lot of implicit copying of data. I ask you, what happens when you write: $s .= "append"; in PHP? What happens when you do assignments in a lot of languages? I'll tell you: a lot of data are being copied around. Without you even realizing, and worse, without you being able to do anything with it. REBOL is very different here. Data is not usually copied implicitly; i.e. something like: a: b is always O(1) whatever datatype B is. (The only "implicit" copying occurring in REBOL is during reallocation, when you grow a series out of its limits. Even in this case, anyway, you are able to avoid it, by preallocating the right amount of memory for your series.) This means that in REBOL you are really able to control the complexity of your algorithms, if you are willing to. Most other scripting languages I know are doing too much things behind the scenes to make this easy/feasible. I really think simplicity has too much advantages. :-) Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: