Quoting Joachim Durchholz <j...@durchholz.org>:

> Am 08.06.2017 um 01:11 schrieb Zoffix Znet via RT:
>> Quoting Joachim Durchholz <j...@durchholz.org>:
> That cannot be correct. There's that other rule that turns 
> superscripts into exponents.

Except it IS correct. There's no "other rule". There are No characters as 
literals
and superscript power operators.

> What I don't know is how Rakudo distinguishes ² 
> (superscript/exponent) from 2 (never assumed to be an exponent). 
> Ideally it would be some Unicode property, but I do not happen to 
> know whether Unicode already offers a property for that.

I already explained that. Perl 6 expects an operator at that position. That's
how the entire freaking language works. You can't keep ignoring the most basic
rule of the language, while trying to advocate how that language should work.

> Since we're talking about what Perl *should* do, which means 
> "programmer expectations", the details of how the parsing is done do 
> not matter *that* much

Except they do. This isn't a detail of parsing. It's the way the language works
ops follow terms and terms follow ops. That's why there's no ambiguity.

> It turns ² into an exponent in some contexts, and into a bare number 
> in others.
> That's pretty special when compared how it interprets 2.

It interprets 2 just the same way. There's no ambiguity in this code:

   <Zoffix> m: sub infix:<2> { $^a + $^b }; say 2 2 2
   <camelia> rakudo-moar 1ac799: OUTPUT: «4␤»

Because when an op is expected. There's just one op named `2`. And when
a term is expected, there's just one term named 2.

> And since nobody is going to use that

Yes! Exactly. You've put the nail in your own coffin with that one. No one ever
is going to use that. So adding special casing Perl 6's standard and simple 
behaviour
in implementations, documentation, and tests, along with any of third party 
user programs,
just to throw an error doesn't make any sense, as the error will not help 
anyone.

And if you still maintain that ²² should be banned. I invite you to answer my
original question that you evaded. Why are superscripts special?
Why are you not banning ⅟², 𑁓², ౸², ㆒², 𐌣², and 𑁒² as well? And if you are,
who are the members of the Yucky Character Unicode Committee to police 
unsightly combinations?

Reply via email to