Re: Angle quotes and pointy brackets
by Larry Wall other posts by this author
Nov 26 2004 5:33PM messages near this date
Re: Angle quotes and pointy brackets
|
Re: Angle quotes and pointy brackets
On Fri, Nov 26, 2004 at 07:32:58AM +0300, Alexey Trofimenko wrote:
: ah, I forget, how could I do qx'echo $VAR' in Perl6? something like
: qx:noparse 'echo $VAR' ?
Hmm, well, with the currently defined adverbs you'd have to say
qx:s(0)'echo $VAR'
but that doesn't give you protection from other kinds of interpolation.
I think we need two more adverbs that add the special features of qx and qw,
so that you could write that:
q:x/echo $VAR/
where ordinary qx/$cmd/ is short for
qq:x/$cmd/
Likewise a qw/a b/ is short for
q:w/a b/
: (Note: I like thoose adverbs.. I could imagine that in Perl6 if you want
: to have something done in some_other_way, you just should insert
: :some_other_way adverb, and that is! perl will DWIM happily :)
Well, that's perhaps a bit underspecified from the computer's point of view.
: I notice that in Perl6 thoose funny « and » could be much more common
: than other paired brackets. And some people likes how they look, but
: nobody likes fact that there's no (and won't!) be a consistent way to type
: them in different applications, wether it's hard or easy.
:
: But to swap «» with [] or {} could be real shock for major part of
: people..
: We also have another ascii pair, < and > . maybe they could be better than
: « and » ?:) i'm not that farseeing, but isn't problem of distinguishing <
: as a bracket and < as an comparison operator no harder than distinguishing
: << as bracket and as part of heredoc?..
It would get very confusing visually, even if the computer could sort it out:
@a > = @b
@a > =< @b
But there are some things that would be completely ambiguous:
%hash<foo> <bar>
%hash<foo> <baz()
: or maybe even we could see consistant to go after +<< +> > and alike, and
: make old < and > written as +< and +> (and then lt and gt suddenly could
: become ~< and ~> :)
I think people would rise up and slay us if we did that. We're already
getting sufficiently risen up and slain over Perl 6.
: But I certain, Larry already weighted exact that solution years ago..
Well, yes, but sometimes the weights change over time, so it doesn't
hurt (much) to reevaluate occasionally. But in this case, I think I
still prefer to attach the "exotic" characters to the exotic behaviors,
and leave the angles with their customary uses.
: P.S. If you have an urgent need to throw spoiled eggs at me, consider all
: above as very late or very early fools day joke.. or you could try, but
: i've never heard about ballistic transcontinental eggs.
If you're a White Russian I suppose the yolk is on me.
Larry
Thread:
Juerd
David Green
Brent 'Dax' Royal-Gordon
Matt Diephouse
Jon Ericson
Smylers
David Green
David Green
Jon Ericson
Larry Wall
Alexey Trofimenko
Juerd
Smylers
Smylers
Alexey Trofimenko
Alexey Trofimenko
Larry Wall
Juerd
Smylers
Jon Ericson
Luke Palmer
Alexey Trofimenko
Larry Wall
James Mastros
Matthew Walton
Juerd
John Macdonald
Juerd
John Macdonald
Juerd
Larry Wall
Larry Wall
Brent 'Dax' Royal-Gordon
Smylers
Smylers
Larry Wall
Juerd
|