<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.
~jerry
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
qX(stuff, specifically not an adverb argument);
?
--
"The rules of programming are transitory; only Tao is eternal.
Therefore you must contemplate Tao before you receive enlightenment."
"How will I know when I have received enlightenment?" asked the novice.
"Your program will then run correctly," replied the master.
Just looking at it, I would expect qX() to call a function. Knowing the macro,
I'd expect it to do q :x :y :z() and then treat the ; as the delimiter, which
probably means the macro should have been written:
qX ::= "q:x:y:z ";
and then the qX() form either does "q:x:y:z ()" or calls the qX() function.
Which all probably means that we're still better off distinguishing quote
macros from "word" macros so that the intent is clear. A quote macro would
have no doubt: qX() always means to call the qX function, not the quoter.
Larry