Re: [stack] impure concatenativity: let without translation

rahul <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
....snip...
> There is. Special forms and macros need access to the entire tree to
> do their work. If you were to put 'define' at the end, then there's no
> way for it to act on the tree (without some bizarre backtracking).

Actually post script does:
/inc3 { 3 add } def

(and so does V :) )

I think the reverse is true, it is harder to go against the flow
when you are using postfix and give special treatment to syntactic markers
like define/let etc.

> Keep in mind that even [a b c] is really (lambda () a b c). Putting
> meta-level things like 'define' and 'let' up front also aids in
> readability.

not entirely. '[a b c]' is really '<quote literal> lambda' :)

On the second point, on One-sentence defitions (like the above) I find
the postfix define easier to parse visually. - I guess it boils down to
a matter of taste.

>> Naive question: Is there any reason why concatenative languages are
>> (uniformly) postfix?  Would prefix work just as well, pushing
>> elements onto
>> the stack from right to left?
>
> Let's say these two are equivalent:
>
>     -- postfix
>     hypot -> sqr swap sqr + sqrt
>
>     -- prefix
>     sqrt + sqr swap sqr <- hypot
>
> Sure, both mean the same thing, but which is easier to read (provided
> you're used to reading left to right)?

--

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/concatenative/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/concatenative/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
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.