Re: [stack] disallowing recursive definitions
Manfred Von Thun <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <C41928C8.1009%[email protected]> |
On 2/4/08 3:15 AM, "John Cowan" <[email protected]> wrote: > Manfred Von Thun scripsit: > >> > My analogy was with Unix pipes. Here each command (a molecule in my >> > meaning) might consist of a primary command (an atom in my meaning)) >> > together with any (often optional) additional atoms. Some of these >> > are additional parameters, some of these are command modifiers. None >> > of these is a command by itself. The Unix pipe is a concatenation of >> > such molecules. > > But surely a molecule like "ls -l -C 2" is just syntactic sugar for > ordinary Joy "[-l -c 2] ls", where the list is treated by the "ls" > word as a list, not a quotation? That is one possible notation. But if a command frequently uses no modifiers, then that notation would force users to supply an empty list of modifiers, as ³[] ls² for your example, in the most frequent uses. My list of candidate notations, using your example of ³ls², and their drawbacks: 1. [-l c 2] ls # forces empty list of modifiers if none are wanted 2. ³la² ls # ditto, only useful for plain flags, no good for other parameters 3. foo | ls l c 2 | bar # unix style pipe symbol, painful if modifiers are rare 4. (ls l c 2) # Lisp notation optional modifier list 5. ls(-l c 2) # functional notation optional modifier list, currently my favourite I must confess that my own list of possible modifiers for concatenative languages is miniscule compared with the multitude of modifiers in unix. But I am hoping that that is mostly a failure of imagination on my part. If anything like this is introduced, then a decision has to be made whether modifiers are just for the primitives or also for user defined molecules. - Manfred [Non-text portions of this message have been removed]