Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^5: Unicode infinity

by Anonymous Monk
on Jul 02, 2024 at 04:43 UTC ( [id://11160305]=note: print w/replies, xml ) Need Help??


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 (Curate) 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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11160305]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-09-07 23:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.