in reply to Re^4: Unicode infinity
in thread Unicode infinity

> π can't be used as a number because

perl -Mutf8 -le 'use constant π => 3.141;print sqrt π'
1.77228665852903

Replies are listed 'Best First'.
Re^6: Unicode infinity
by NERDVANA (Priest) on Jul 02, 2024 at 04:51 UTC
    Right, but that's using it as an identifier that returns a constant. In the parsing phase, it goes through "we have a word, what does it mean?" We can't define that as part of the language without breaking existing code, or going through a version-guard like with the new keywords in the builtin:: namespace. The infinity character is not a word character and can't be used as the name of a sub or variable or anything. (other than as the delimiter of a qq∞...∞, but my proposal doesn't break that) It also isn't stealing a useful character from someone's language.