Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The syntax clashes with the International System of Units #56

Open
ttepasse opened this issue May 30, 2020 · 4 comments
Open

The syntax clashes with the International System of Units #56

ttepasse opened this issue May 30, 2020 · 4 comments

Comments

@ttepasse
Copy link

The vast majority of earth's population will have grown up with the metre as the dominant unit of length and will interpret 1.5m as a length. Granted, not every one of them is a programmer and any competent programmer can reprogram her or his brain to codeswitch, interpreting familiar expressions in a new and completely context. Still, it is a mental papercut and unnecessary mental weight, one of those which are most harmful to new and beginning programmers and follows a non-internationalisation bias like the unfortunate use of the diacritical accent grave for template strings.

If it must be a suffix consisting of a letter beyond g – why not a p, standing for precision?

@littledan
Copy link
Member

Ah, that's a good point, I didn't think about this. Sure, why not p? Or, any other ideas?

@lazarljubenovic
Copy link

Skimming through the README for the first time, I was also confused at 1m + tax. 1p definitely looks better to me too, as similar notations (1f in C, 1n in JS) don't bring any existing common SI unit to mind.

@munrocket
Copy link

Fun issue but true. Another possible notation:
n - Natural
r - Real

@ptomato
Copy link
Collaborator

ptomato commented Jan 19, 2022

I remembered about C hex float literals today (e.g. 0x1.ffffp+3) and so maybe we should avoid p in case JS wanted to add that notation in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants