On Tue, May 09, 2006 at 11:15:24PM -0700, jerry gay wrote:
: according to S02, under 'Literals', generalized quotes may now take
: adverbs. in that section is the following comment:
:
: <snip>
: [Conjectural: Ordinarily the colon is required on adverbs, but the
: "quote" declarator allows you to combine any of the existing adverbial
: forms above without an intervening colon:
:
: quote qw; # declare a P5-esque qw//
: <snip>
:
: there's trouble if both q (:single) and qq (:double) are allowed
: together. how would qqq resolve? i say it makes sense that we get
: longest-token matching first, which means it translates to :double
: followed by :single.
That would be one way to handle it. I'm not entirely convinced that
we have the right adverb set yet though. I'm still thinking about
turning :n, :q, and :qq into :0, :1, and :2. I'd like to turn :ww
into something single character as well. The doubled ones bother me
just a little.
But as it stands, the conjectured quote declarator is kind of lame.
It'd be just about as easy to allow
quote qX :x :y :z;
so you could alias it any way you like. Or possibly just allow
alias qX "q:x:y:z";
or even
qX ::= "q:x:y:z";
as a simple, argumentless "word" macro. But the relationship
of that to "real" macros would have to be evaluated. There's
something to be said for keeping macros a little bit klunky.
On the other hand, if people are going to invent simplified
macro syntax anyway, I'd rather there be some standards.
Larry