Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
wtetzner
7y ago
0 comments
Save
Share
Why not use 0x,0b, and 0o for hex, binary, and octal literals? I never liked the fact that a number starting with 0 was treated as octal.
0 comments
1 comments · 1 top-level
top
newest
oldest
steinuil
7y ago
OCaml does just that; it might have been the first language to have 0b and 0o prefixes for binary and octal literals.
https://discuss.ocaml.org/t/the-origin-of-the-0b-01-notation...
j
/
k
navigate · click thread line to collapse