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


From: g:santilli:tiscalinet:it at: 25-Feb-2002 10:21

At 02.34 25/02/02, Holger wrote: [I have to say I agree wholeheartedly with Holger! I only have a question...]
>In an interpreter the situation is different. The interpreter needs to >determine at run time whether a call is a "tail call" and allows optimization.
Would it be possible to offer a recursive-function! datatype that ALWAYS does tail recursion optimization? This way the user is the one making the choice. (Not that this wouldn't be impossible to do in REBOL itself, following the lines of Joel's article on RebolForces...) Or, more useful and interesting, would it be possible to do it for PARSE rules? Recursive rules are simpler and shorter that iterative ones in a lot of situations, but cannot really be used in REBOL because of stack overflow (if you don't know the size of the input in advance --- e.g. when it comes from a TCP connection --- you cannot risk using a recursive rule). What do you think? Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: