Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Re: Re: Perl 6 feature that scares me the most:

by stefp (Vicar)
on May 29, 2003 at 21:59 UTC ( #261701=note: print w/ replies, xml ) Need Help??


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

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.


Comment on Re: Re: Re: Perl 6 feature that scares me the most:
Re: Re: Re: Re: Perl 6 feature that scares me the most:
by jqb (Novice) on Jun 04, 2003 at 16:55 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.
    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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://261701]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2014-12-19 23:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (94 votes), past polls