On Sat, 24 Jul 2004, Jonadab the Unsightly One wrote:

> > As a related side note, is it possible to use multi-char delimiters in 
> > Perl6? I mean, a la:
> >
> >   qq<<...>>;
> 
> I would worry that you'd be getting "<" and ">" at the beginning and
> end of your string.  IMO, there are enough characters in ASCII that
> for any short quotation you ought to be able to find one character you
> can use as a quote delimiter.  For longer quotations, we have
> heredocs.

Of course, and in this respect my choice for an example was most probably 
not the best appropriate one, still, in view of all this huffmanization 
phylosophy, it occurs to me that just as one should avoid (at least in 
Perl5) // as delimiters in regexes if he has to match some literal "/"'s, 
it would be sensible to allow, say qq((...)), to have a different meaning 
from qq/(...)/ because should one have needed the latter, he would have 
used it in the first place and this may leave another possibly more 
interesting use for the former...

> Speaking of which, that raises another question:  can we apply adverbs
> to heredocs?
> 
> if (somecondition()) {
>   $foo = << :indent(5) "FOO";

FWIW I, for one, would regard this as Very Cool(TM). This is yet another
thing that may be done in many other ways, but a similar adverb would
greately simplify one's life!


Michele
-- 
>Ah, but the REAL myster is -- did Pythagoras really discourage eating
>beans because they resembled human testicles? Or is that another myth?
I always thought it was because of their musical qualities.
- Robert Israel in sci.math (slightly edited)

Reply via email to