Re: [stack] What does "concatenative" actually mean?
spir <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <20090307095102.3f04bf0b@o> |
Le Fri, 6 Mar 2009 21:13:27 -0500, Christopher Diggins <[email protected]> s'exprima ainsi: > The only difference between lambda abstractions and quotations is that > lambda abstractions allow (but do not require) the usage of named > variables. In a quotation, there is always exactly one implied > variable, a stack (at least in Joy and Cat). Maybe we'd better call this this "anonymous word/func". I still think, at least conceptually, [square] is very different from [dup *] even if they end up performing the same. * [square] recalls something already defined. * [dup *] defines a new, here anonymous, function. Anyway, I understand that syntactically speaking there is no difference between [square] and eg [dup square square +]: the former beeing an anonymous func that simply happens to be 1 term long. (Correct?) But I find this a pity. One should be able to recall definitions. [Side note: The point is similar for me to variables in applicative languages. Many allow or require first declaration/definition/initialization of a new name. In other languages (eg python), there is no way in n = 1 to know whether: * the programmer's *intention* is to introduce a new name:value pair or rebind an existing name to a new value * the interpreter will create a new entry in the local namespace's dict, and give it an initial value, or update the value of an existing key:value pair.] This also leads to syntactic scope issue like need of local/global free var/attribute explicite distinctions. Denis ------ la vita e estrany