Is the world coming to an end?

Daniel Gibson metalcaedes at gmail.com
Sat Apr 2 15:07:52 PDT 2011


Am 03.04.2011 00:00, schrieb ulrik.mikaelsson at gmail.com:
> About time someone dropped the 0777-nonsense. The least common digit-base should
> not easily be invoked "by accident".
> 
> However:
> 
> 
>> I don't like the "octal!" a lot, I prefer a syntax like the Python3 one, but
>> Walter never stops moving himself forward :-)
> 
> I too was just about to ask why on earth "octal!" instead of 0o (and I didn't
> know about Python3).
> 
> Sure, I think it's nice and clean language-wise to implement it as a
> template-function, but if so the same should go for 0b and 0x? Are they too
> deprecated in D2?
> 

0b and 0x are not "dangerous" so there's no need to remove/deprecate them and
thus cause breakage of code using them.
At least 0x is quite common (certainly more common than octal numbers) so it
makes sense to have this short syntax (IMHO).

Cheers,
- Daniel


More information about the Digitalmars-d mailing list