http://qs321.pair.com?node_id=261659


in reply to Re: Perl 6 feature that scares me the most:
in thread Perl 6 feature that scares me the most:

Syntax isn't a feature, as such. (According to the lisp folks, syntax is a mis-feature, but who listens to them? :)

Replies are listed 'Best First'.
Re: Re: Re: Perl 6 feature that scares me the most:
by stefp (Vicar) on May 29, 2003 at 21:59 UTC
    MC Carthy, when creating Lisp, decided on an abstract syntax that is fine and dandy for people doing program rewriting but never provided a human palatable concrete syntax. But normal people often don't deal at that level. The constraints to clearly display programs are different than those to programmatically manipulate them.

    On the other hand. Perl5 had never correctly tackled the problem of program manipulation/transformation. Source filters are a ugly hack; eval-string should be limited to deal with user output. Dealing directly with B:: modules with the "object" level, hum, the intricate plate of spaghetti generated whem compiling a Perl program is even worse.

    At last, with Perl6, we will have macros in the sense of Lisp (abstract syntax level rewriting) not in the sense of C (textual level rewriting, the C-preprocessor does not even know about C concrete syntax).

    Macro combined with concrete syntax will be a way to cast cleanly new programmatic patterns in the language.. Perl has always promoted growth and experimentation but had never provided an appropriate mechanism. To fully understand the power of macros in Perl6, one should read Paul Graham's book On Lisp while keeping in mind the stuff about macros in the last apocalypse.

    Perl6 macros will bridge the gap between abstract and concrete syntax. I have been told that it is not the first to do it but if Perl6 becomes popular, it will bring that power to general conciousness.

    Note also that the distinction between concrete and abstract syntax parallels the distinction made by Chomsky between surface and deep structures.

    But some will claim that Chomsky is a fraud in linguistic. This has nothing to do with his political opinions :)

    From modern compiler implementation in ML p 101:
    The notion of abstract syntax is due to McCarthy (1963), who designed the abstract syntax for Lisp (McCarthy et al. 1962). The abstract syntax was intended to be used writring programs until designers could get around to create a concrete syntax with human readable punctuation (instead of Lots of Irritating Silly Parentheses), but programmers soon got used to programming directly in abstract syntax.

    -- stefp
    Come to YAPC::Europe 2003 in Paris, 23-25 July 2003.

      MC Carthy, when creating Lisp, decided on an abstract syntax that is fine and dandy for people doing program rewriting but never provided a human palatable concrete syntax.
      McCarthy defined both S-expressions for symbolic manipulation and M-expressions for publication.
      Note also that the distinction between concrete and abstract syntax parallels the distinction made by Chomsky between surface and deep structures.
      I don't see that it does.
      But some will claim that Chomsky is a fraud in linguistic.
      Anyone making such a claim is a fraud.
      This has nothing to do with his political opinions :)
      For the most part, Chomsky quotes from public documents and draws obvious inferences. Quite in contrast to McCarthy, who is a standard-issue jingoist who indeed has nothing but uninformed opinion when it comes to politics.
Re: Re: Re: Perl 6 feature that scares me the most:
by bear_hwn (Acolyte) on Jun 03, 2003 at 21:28 UTC
    shouldn't that be:
      "Syntax isn't a feature, as such.
      (According to the lisp folks, syntax is a mis-feature (but who listens to them? :) )" ? :-)

    Edit by tye, remove PRE around long lines.