From: "Ben Tilly" <[EMAIL PROTECTED]>
   Date: Fri, 13 Jun 2008 14:13:24 -0700

   On Thu, Jun 12, 2008 at 7:40 PM, Bob Rogers wrote:
   > That's source filtering, which is much cruder; it's a single hook that
   > happens before lexing/parsing, rather than during.  Lisp has a simple
   > way to say "evaluate this and insert it into the parse at this point,"
   > and a much more elaborate mechanism for hacking the lexer in order to
   > introduce new syntax.  New syntax can also be introduced via macros.

   I did not know what you meant by "at read time".  And yes, I am fully
   aware of the power of Lisp macros.  However it is rare in Lisp to
   introduce new syntax.  Other than the ubiquitous '(foo) for (QUOTE
   foo), the Lisp I've seen doesn't use much syntactic sugar.  Other
   kinds of sugar, sure, but still it is "toenail clippings in oatmeal"
   to borrow a phrase from Larry Wall.

It's true that read-time hackery is rare in CL apps.  But, FWIW, the
Lisp community uses the phrase "syntactic sugar" almost exclusively to
talk about new high-level syntax introduced by macros, not about reader
syntax.  And Lisp apps typically use lots of macros.

   ================
   From: Uri Guttman <[EMAIL PROTECTED]>
   Date: Fri, 13 Jun 2008 20:21:24 -0400

   >>>>> "BT" == Ben Tilly <[EMAIL PROTECTED]> writes:

     BT> Perl 6 will have all sorts of things letting you more reliably and
     BT> flexibly redefine syntax.  You'll be able to hook directly into the
     BT> parsing process, redefine the grammar, and do things like define your
     BT> own operators.  However I don't know of anything that will match
     BT> Lisp's macro system.

   don't quote me but i believe larry made perl 6's macros be as powerful
   as lisp's. a macro can replace with text which gets parsed or with a
   preparsed op tree which is more like how lisp does it. the pelr6
   language list can clarify this or someone can delve into the synopses
   docs.

   uri

I think this is what is intended, but I can't find macros in the
Synopses, so I can't confirm it (though I've only read a few of them
myself).  In any case, it is probably not specced in any kind of detail
yet.

                                        -- Bob
 
_______________________________________________
Boston-pm mailing list
Boston-pm@mail.pm.org
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to