Anonymous macros?

2005-06-13 Thread Ingo Blechschmidt
Hi, just checking: Are anonymous macros allowed? my $macro = macro ($x) { 100$x }; say $macro(3); # 1003 Of course, anonymous macros can't be called at compile-time, like normal macros: my $macro = rand 0.5 ?? macro ($x) { 100$x } :: macro ($x) { 200$x }; say $macro(3); # 1003

Re: Anonymous macros?

2005-06-13 Thread Larry Wall
On Mon, Jun 13, 2005 at 05:25:59PM +0200, Ingo Blechschmidt wrote: : just checking: Are anonymous macros allowed? I have no problem with macros being first-class objects during the compile. Though the macro itself may have a problem with your passing it '3' when it is likely expecting an AST