Re:Microfeatures I'd like to see in more languages
by makapuf on Friday January 06, 2023 @02:02AM
(#34271800)
Wouldn't endianness interfere with this notation and the preceding one?
[ Parent
| on HN ]
Re:Microfeatures I'd like to see in more languages
by unsafecast on Friday January 06, 2023 @08:06AM
(#34274187)
Of course it does - endianness interferes with any sort of numeric literal. Doesn't matter if it's hex, decimal, underscored, whatever.
Re:Microfeatures I'd like to see in more languages
by Wildgoose on Friday January 06, 2023 @08:48AM
(#34274496)
I think you are missing the point - there is no endianness in normal written text, (or code), but there is endianness when that is translated to an actual number - what order are those bytes intended to be used in?
(Given they have been listed separately rather than as a single number).
Re:Microfeatures I'd like to see in more languages
by unsafecast on Friday January 06, 2023 @09:34AM
(#34274992)
What order are the bytes in 0xabcd intended to be used in? I don't see how making it 0x[ab, cd] would be ambiguous, it's the same assumption of reading left to right.