Am 07.06.2017 um 23:09 schrieb Zoffix Znet via RT:
What baffles me is we have several people calling for the ban on The
Superscripts yet, no one appears
appear to have any issues with ⅟², 𑁓², ౸², ㆒², 𐌣², and 𑁒² which are also
perfectly valid sequences.
I would have issues with these if I had known about them.
But before deciding how to deal with them: What are the
supposed/expected meaning of the following constructs?
3²
x²
²
As the naive that I am, I'd expect these things to happen:
3² should be 3 squared, i.e. 9
x² to be x squared, i.e. an expression
² confuses me, does that even make sense?
----
Replying to your other message:
My entire point is the reason these sequence parse is due to well
defined behaviour that a No character can be used as a literal
numeral.
What happens actually is that in ³², the ³ is taken as a base and the ²
as an exponent (that's why we're getting ³² == 9.
If the superscripts were handled just like normal literal digits, the
result should be 32.
What's undefined is why you, and Alex-Daniel you're seconding,
hereare choosing to ban superscripts.
Actually no. Well, at least for what I'd like to see, I'm not sure what
Aleks-Daniel wanted.
Anyway: Now given that the ² in ³² is already considered to be an
exponent, I'd expect ³² to be the moral equivalent of **32. Which might
or might not be a syntax error, depending on whether we have a numeric
expression before it or not.
If it's aesthetics alone,then there are plenty of other characters
that foot the bill.
Well, for me it's not aesthetics, it's expectations.
*If* Perl6 is interpreting superscripts specially (and it already does),
*then* I expect it to recognize a bare ² as an exponent, and since bare
exponents do not make any sense, I'd expect it to throw an error.
I.e. no specialcasing at all beyond what's already there.
Actually I'd like to *remove* a special case: That ² is to be
interpreted as 2 if it is not in a context that allows **2.