Re: [stack] What does "concatenative" actually mean?
John Nowak <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
On Mar 3, 2009, at 3:00 PM, William Tanksley wrote: >> Id est replace words with their definitions. > > "A language is concatenative iff one can replace words with their > definitions." I think that's at least CLOSE. You might also have to be > able to replace a definition with the word as well -- it has to run > both > ways. You also have to be "persnickety" that you're not allowed to > rename anything during the replacement (i.e. you're not allowed to do > beta reduction or alpha conversion). You make it sound like Haskell might qualify. You can certainly replace words with their definitions in Haskell. Replacing expressions with the word that names them is possible as well for any "valid sub- program". For example, I can take '(\x -> foo x 10) y' and convert it to 'bar y' if 'bar' is defined as '\x -> foo x 10'. I could not, however, do something like replace 'foo x 10' with something because it is not a valid sub-program (as 'x' is not introduced anywhere). I think the best definition of a concatenative language is as follows: "All terms denote functions and their juxtaposition denotes composition." Everything else follows from this. It also makes it clear why Haskell doesn't qualify. - John