On Sat, Apr 30, 2005 at 10:06:32AM -0600, Luke Palmer wrote:
: Aaron Sherman writes:
: > On Tue, 2005-04-26 at 09:37 -0600, Luke Palmer wrote:
: > 
: > > We're thinking at the moment that `while` will probably look like this:
: > > 
: > >     sub statement:<while> (&cond is lazy, &block) {
: > [...]
: > 
: > Just curious, why a sub and not a macro?
: 
: Didn't need a macro.  statement:<while> will probably end up generating
: parrot code directly, but this is a possible non-macro implementation.

Your sub declaration there strikes me as just an inside-out macro
declaration, insofar as it won't work unless the declaration is
visible as a predeclaration in the lexical scope, just like a macro.
It might be permissible as a form of syntactic sugar if we were
trying to encourage people to write braceless code, but I'm not
sure we want to encourage that.  In fact, I'm pretty sure we don't.
Maybe "is BRACELESSANDIREALLYMEANIT" or some such...  :-)

So maybe instead of sub that is told to be braceless on some arguments,
what we really want is a macro that can be told evaluate some of its
arguments normally rather than returning an AST.  Not sure how this
links into the macro syntax though.

Larry

Reply via email to