4 ms·
I can't believe C binary constant is non standard. It is so easy to solve. Why can't we extend source transformation? The feature is useful - lisp known for ma
by sergeykish 6y ago
I can't believe C binary constant is non standard. It is so easy to solve.
Why can't we extend source transformation? The feature is useful - lisp known for macros, javascript recently got string transformation:
b = s => parseInt(s, 2)
b`101010`
42
Of course this requires changes to the language. Can we solve it with markup [1]?
[1] http://sergeykish.com/c-binary-constants http://sergeykish.com/c-binary-constants
- Const-me 6y ago> I can't believe C binary constant is non standard They are part of C++14 standard: https://en.wikipedia.org/wiki/C%2B%2B14#Binary_literals https://en.wikipedia.org/wiki/C%2B%2B14#Binary_literals
- sergeykish 6y agoThe one without ++
- SAI_Peregrinus 6y agoC++ is a different language. They're non-standard in C. Even in C2x. Probably worthy of a feature proposal though.