|We don't bite newbies here... much|
Re: Re: Re: Perl 6 feature that scares me the most:by stefp (Vicar)
|on May 29, 2003 at 21:59 UTC||Need Help??|
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: