3 ms·
In the binary literal proposal there is also some unresolved discussion about octal support, chip in if you like: https://github.com/dotnet/roslyn/issues/215 h
by Sir_Cmpwn 10y ago
In the binary literal proposal there is also some unresolved discussion about octal support, chip in if you like:
https://github.com/dotnet/roslyn/issues/215 https://github.com/dotnet/roslyn/issues/215
- Jtsummers 10y agoI wish more languages would take a radix-agnostic approach (at least to a reasonable limit). What's wrong with: 2#1010101 8#75342 1341235 10#13451 16#feb1300 radix#value, from erlang. Or: #b10101 #xfefe #o7777 #36rSSSS From common lisp. Customize in some fashion for C# and its current notations for hex and (now) binary literals. 036rSSSS 02r10101 0b10101 // this and above are equal
- Retra 10y agoThe reason people don't do this is: 1. Our current base notation is already familiar and widely used. Nobody is confused about 0xA vs 0b10. 2. Nobody will really use those other bases, so you're adding obscure features that muddle your syntax.