Hi List,

See below, reposted with permission. If we only can get RT to include
Ladislav's or my tail-func...

----------------------------

Hi Maarten,

This used to be in REBOL (tail recursion, continuations, and other
tricks -- using some of the most advanced optimization concepts
invented). Problem was, it caused REBOL to use many times more memory,
and it was many times slower. We had to take it all out.

Continuations are a cool concept in theory. Since I first learned about
them in 1984, they have seemed like a useful idea. Problem is, not every
useful idea is practical. Continuations often reference a huge context
(hence is not allowed to be GC'd), even if your code exited the context
long ago. If you think REBOL gobbles memory for contexts now, it was
really bad in the continuation days.

Tail recursion is another issue. I've implemented it before in other
languages (e.g. Amiga Logo) and found that it was a bit tricky. It's one
of those things I'd like to put back into REBOL, but there are other,
more severe restrictions in recursion that have higher priority. For
example, there's a GC protection stack that I think overly limits
recursion in the current interpreter. We've actually removed it in an
experimental version, but its untested and we worry that it may make
REBOL unstable so we've not released it (testing takes so much time
compared to coding!)

Let me know how it goes.

Best regards,

-Carl
PS: Feel free to repost this message if you want/need to.


>>Hi Carl,
>>
>>I would like to build a REBOL evaluator in REBOL, for fun and
learning.
>>In the end I want to see if I can get first class continuations in
this 
>>toy interpreter.
>>
>>Now REBOL is... amazing when you think about its language model. Is 
>>there any hint that you can give me? My idea is to re-implement reduce

>>using my tail recursion elimination trick and the current reduce.
>>
>>And then redo 'do , load etc. softREBOL would be a nice environment
for 
>>language experiments IMHO. But REBOL is not described in any way that 
>>makes this easy to "get".
>>
>>
>>--Maarten

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

Reply via email to