Aaron Sherman skribis 2004-04-16  9:52 (-0400):
> 3. You proposed (late in the conversation) that both could co-exist, and
> while that's true from a compiler point of view, it also leads to:
>       `stuff``stuff`stuff

Huh? No. That is a syntax error.

>       $a`a=$a`b~`a` # Try to tell your editor how to highlight that!

Try to tell your editor how to highlight:

    print "$foo{ / (\d+) { $1 eq "10" or $1 ~~ /5/ and fail } / ?? $1 : "" }";

Better hurry, because it (or something close to it) will soon be valid
syntax.

Also, try using sane spacing and then having confusing syntax.

>       `$a`b`c` # May or may not give an error, but shocking either way

Syntax error.

> One of the things that I absolutely despise about auto-quoting is that I
> keep running into the second most popular reason for code ugliness:
> 
>       $x`y = 1;

$x{y} = 1;

>       $x`z = 2;

$x{z} = 2;

>       $x{"a b"} = 3; # Ooops, can't use ` for that one

$x{"a b"} = 3;  # Oops, can't use unquoted string for that one.

In this case, you should probably have used {} for each of the options.

Most hashes are there mainly to keep a bunch of variables organized, and
let me show you something else:

$y = 1;

$z = 2;

${"a b"} = 3;  # Oops? No!

There is no oops. 

` is what you use when you know every key will be a \w+ one, or at least
most will be. Or what you use if one of the keys is \w+ and you do not
care about mixing syntaxes.

> Now, mind you: if  you WANT to add this to Perl 6, there is nothing
> stopping you from writing your own syntax module for it. Go to town, and
> I won't try to stop you!

Keep repeating it and it will become more true.

I know that trick too and will also repeat one message:

I'm not asking if this is possible. I know it is. I'm suggesting we put
it in the core.

For reasons to want it in the core, see Scott's summary.

I very probably will have and will use this syntax. I'm not talking
about me. I suggest this feature because I think it's good for Perl and
the people who use it.

Except for the shocking number of closed-minded people on this list.

Fortunately, they can still use {} whenever they want.

> > I think I have presented two cases. The removal of `` and the
> > introduction of %hash`key. Either can be implemented without breaking
> > the other, though I obviously think both letting `` go and introducing
> > the infix ` is better.
> And others disagree. Why can't we leave it at that, and if the consensus
> goes toward implementation of your idea, more the better.

Most of those who disagree so far do that they either don't understand
that `` does not have to go, or because they find the ` "ugly".

Fortunately, there are also people who absolutely love the proposed
%foo`bar.


Juerd

Reply via email to