Sujet : Re: "Back & Forth" - Local variables
De : the.beez.speaks (at) *nospam* gmail.com (Hans Bezemer)
Groupes : comp.lang.forthDate : 10. Jan 2025, 13:42:56
Autres entêtes
Organisation : KPN B.V.
Message-ID : <nnd$3a616a68$735d3805@123d8a188c4e0435>
References : 1 2 3 4 5 6 7 8
User-Agent : Mozilla Thunderbird
On 10-01-2025 00:54, dxf wrote:
The >R dependency is on what was (and perhaps still is) 'common practice'.
I was unsure how it would fare but all the popular forths seem to work.
If ANS-FORTH has issued one too many 'Thou shalt not's and in doing so has
excluded itself then that's too bad.
Oh, you won't find me on the side of "the standard". As a matter of fact, 4tH allows a lot of things that the standard doesn't allow and vice versa. But I think it is a useful tool when deciding what SHOULD be portable or SHOULDN'T be portable.
In general, I'm all for adopting "common practice" (I'm not going to list all my exceptions). In this case - why not?
1. It's very hard to enforce (unless you flag all RS items - ugly - or separate the call stack);
2. It's useful to create e.g. co-routines;
3. I don't recommend the practice, though. It's hard to wrap your head around and in 4tH it may clash with the tail call optimizer. But since 4tH is completely sandboxed, you can't do much damage. If you (attempt to) jump outside the box, the program is halted.
Hans Bezemer