Author: audreyt
Date: Wed Jun 28 18:43:52 2006
New Revision: 9720

Modified:
   doc/trunk/design/syn/S06.pod

Log:
* S06: Macros now re-splice in runtime when called as functions;
  this closes the unspecced "taking &macro as an object and call it"
  loophole in S06.

Modified: doc/trunk/design/syn/S06.pod
==============================================================================
--- doc/trunk/design/syn/S06.pod        (original)
+++ doc/trunk/design/syn/S06.pod        Wed Jun 28 18:43:52 2006
@@ -2158,6 +2158,15 @@
 original language and know which parts of the derived program come
 from which parts of the user's view of the program.
 
+If you call a macro at runtime, the result of the macro is automatically
+evaluated again, so the two calls below prints the same thing:
+
+    macro f { '1 + 1' }
+    say f();    # compile-time call to &f
+    say &f();   # runtime call to &f
+
+=head2 Quasiquoting
+
 In aid of returning syntax tree, Perl provides a "quasiquoting"
 mechanism using the quote C<q:code>, followed by a block intended to
 represent an AST:

Reply via email to