Matthew Walton skribis 2004-04-14 21:23 (+0100):
> >%foo<<$bar>> doesn't quite do the same as %foo{$bar}.
> That's one method, really - <<>> being like {' '}, and really just 
> carrying on the very familiar idea of different kinds of quotes. Like ' 
> and ".

The <<>> thing works as if there is an implicit {} around it: <<>> is
an alias for qw.

<<>> doesn't interpolate. Its insides are string literals separated by
whitespace.

"«foo»" is 13 key presses, "<<foo>>" is 9 key presses, "{'foo'}" is also
9, "`foo" is only 4.

(using vim's ^K and counting keys, not characters. That means shift and
ctrl DO count)

> The ` idea is completely different.

Fortunately so.

> Also, ditching `` quotes strikes me as a fairly dreadful idea.

Because you're used to them. You're also used to many other things that
change when you go from Perl 5 to Perl 6.

If you dislike when symbols get to mean different things, reading about
Perl 6 must be a terrible experience for you.

> Yes, I could use qx// instead, but I could also use qq// instead of
> "".

If it were up to me, qx would also be removed from the language and only
readpipe would be left. 

> Ultimately, ` looks like an opening quote character, and so people will 
> expect it to behave like one. I think that violates the principle of 
> least surprise.

Least surprise is important for constructs that aren't used
continuously. Whatever is used throughout people's source code,
*defines* what people expect and is therefore after seeing it for the
first time no longer a surprise.

Some people say {} looks like a code block, and that so people will
expect it to behave like one. However, Perl 6 also uses it for hash
reference constructing, hash subscripting, alternative delimiters, rule
blocks, and perhaps even other things.

Perl 5 and PHP coders will expect . to be concatenating, -> to be
for calling methods. What people expect because they are used to other
    programming languages does not matter at all. The language should be
    a consistent universe within itself. If THAT it is not, you are
    violating the principle of least surprise.

Believe me, any non-Perl-6 coder will be surprised when seeing Perl 6 in
action. And that is a good thing.


Juerd

Reply via email to