[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What?
In article <joswig-93EE80.14310512082002@news.fu-berlin.de>,
Rainer Joswig <joswig@lispmachine.de> wrote:
> In article <3D57A1E1.A5C24DD0@lucent.com>,
> Gabor Greif <ggreif@lucent.com> wrote:
>
> > Well, I cannot help, but this very much reminds me of infix syntax :-)
> >
> > The usage of punctuation always counted as the distinguishing feature of
> > infix syntax.
>
> Hmm, why do you think Lisp's (or in prefix Dylan years ago) usage of
> "prefix" syntax needs to be primitive? In reality prefix is more
> complex and infix is not really infix.
I agree that Dylan's syntax is not *really* infix outside of the
mathematical binary operators, but that is the commonly-use term for it,
in order to contrast it with e.g. Lisp or Forth syntax.
> There are quite a few diffent ways how Lisp uses "syntax".
I agree.
> - function calls:
>
> (foo 3 :bar 4 :baz 5)
>
> - keyword value pairs
>
> (defclass foo ()
> ((slot :accessor foo-slot :type number)))
>
> - embedded languages
>
> (loop for i from 3 below 10 count (oddp i))
>
> and more...
>
> The good thing is that each "expression" and "sub-expression"
> has surrounding parentheses.
Well that's where you're wrong.
":bar 4" is a sub-expression, but has no surrounding parentheses.
":accessor foo-slot" is a sub-expression, but has no surrounding
parentheses.
"from 3 below 10" is a sub-expression, but has no surrounding
parentheses.
Don't get me wrong. I think this is a *good* thing, that different
sorts of groupings use visually different marks, or even english words,
to group them. This is one of the ways in which CL syntax is better
than Scheme syntax. Dylan just takes it a little further, replacing a
few more types grouping with symbols or words instead of parentheses.
-- Bruce
- Follow-Ups:
- Re: What?
- From: Gabor Greif <ggreif@lucent.com>
- Re: What?
- From: Duane Rettig <duane@franz.com>
- Re: What?
- From: Rainer Joswig <joswig@lispmachine.de>
- References:
- What?
- Re: What?
- From: "Jason Trenouth" <jason.trenouth@bigfoot.com>
- Re: What?
- From: Rainer Joswig <joswig@lispmachine.de>
- Re: What?
- From: Andreas Bogk <andreas@andreas.org>
- Re: What?
- From: Bruce Hoult <bruce@hoult.org>
- Re: What?
- From: Rainer Joswig <joswig@lispmachine.de>
- Re: What?
- From: Gabor Greif <ggreif@lucent.com>
- Re: What?
- From: Rainer Joswig <joswig@lispmachine.de>