On Tue, Mar 26, 2013 at 7:06 PM, Reini Urban <rurban@x-ray.at> wrote: > On Sun, Mar 24, 2013 at 11:47 PM, Father Chrysostomos <sprout@cpan.org> > wrote: > > Zefram wants to deprecate the keyword plugin, in favour of using sub > lookup for all overrides. I can see why, as it’s a bit heavy-handed. > > Elegant yes, I also implemented if/else/elsif and most other keywords as > compiler or RT (runtime library) methods in p2. > But for p5 this does not help us in reaching macros as subs are the > complete > opposite of macros. If there is a compiler mechanism not to evaluate the > sub args, then okay. > There is. A call checker attached to the sub can replace the sub call with any opcode tree it likes. See Syntax::Feature::Loop for an example of this. It uses lexical subs provided by Lexical::Sub, but that difference is not significant. http://cpansearch.perl.org/src/IKEGAMI/Syntax-Feature-Loop-v1.6.0/lib/Syntax/Feature/Loop.xsThread Previous