Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) 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:
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.


In reply to Re: Re: Re: Perl 6 feature that scares me the most: by stefp
in thread Perl 6 feature that scares me the most: by Elian

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-03-29 11:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found