Re: [stack] disallowing recursive definitions

"William Tanksley, Jr" <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
Manfred Von Thun <[email protected]> wrote:
> > > wrote:
>  >> >  The upshot: have we in the concatenative world missed out
>  >> >  on something useful by not allowing parts to the smallest
>  >> >  programs. There is a lot one could and should discuss here,
>  >> >  but not me, not tonight.

>  > We do already do that. All concatenative languages (except 01 :-)
>  > support numbers, which are molecules by your definition. Most support
>  > strings. Joy quotations are molecules whose component parts happen to
>  > be a proper subset of Joy itself.

>  No, I mean something quite different. I did not mean that a molecule
>  consists
>  of consecutive digits (as do numerals) or of other printing characters
>  (as do most symbols). Nor do I mean strings or quotations (including lists).
>  Using the terminology of the grammar of Joy, all of the above are factors,
>  resulting in a single operation being performed on the stack. 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.

I see. You want not an ability to define ANY type of syntax (which is
what I described), but rather a small, standard syntax suited to
common problems.

That's an interesting problem. The syntax you propose reminds me of
strongForth's inline type specifiers: because Forth's "EXECUTE" (a
rough equivalent to Joy's "i") could have any stack effect and
StrongForth has no type inference, Becher did not define "EXECUTE",
and instead defined "EXECUTE(", a word which parsed for a close-paren
and interpreted the contents as a type signature.

I also note that Joy currently has words which would benefit from
this; for example, all the words that have a number as part of their
name could be replaced by the single word without the number, but
taking an optional argument.

REBOL does this kind of thing with the "/" (refinement) construct.

>   - Manfred

-Wm
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.