[REBOL] Re: Parse and and recursion local variables?
From: volker:nitsch::gmail at: 18-Mar-2007 22:38
Am Samstag, den 17.03.2007, 19:34 +0100 schrieb Petr Krenzelok:
> Volker Nitsch wrote:
> > My typicall way to do that is my own stack.
> > stack: copy
> > parse rule[
> > (insert/only stack reduce[local1 local2])
> > rule ;recursion
> > (set[local local2] first stack remove stack)
> > ]
> Guys, got to go to have few beers tonight with my friends, but - that
> kinda sucks ;-) I can guarantee you, that most novices, like me, will
> swear like mad when developing and touching first recursion. I think,
> that rebol's aproach of implicit global nature of words, even those
> inside functions, is the main hell for novices :-)
> One quick question - how is that with function recursion? Can I have
> "local" function value to one level of recursion call? And then shared
> one? I know I can build my own stack, but ... :-) And if it is possible
> with functions, parser should explicitly behave like that, even if it
> breaks rebol rules :-) Will try with recursive function or stack later ...
I agree completely. That, the missing thru[a | b] and the clumsy
charsets are the biggest showstoppers for beginners IMHO. there are
workarounds, but they need a lot explaining/insights.