why remove octal literal support?

d007 d007 at gmail.com
Mon Nov 6 04:59:22 UTC 2023


On Friday, 3 November 2023 at 15:34:37 UTC, Steven Schveighoffer 
wrote:
> On Friday, 3 November 2023 at 15:07:41 UTC, d007 wrote:
>> dlang is know for compile speed,  but in reality d project 
>> compile slow because so much ctfe and tempalte.
>>
>>
>> Why bring more ctfe call by remmove octal literal ?
>
> octal literals are extremely error prone, because people 
> sometimes use leading zeroes for alignment, not realizing that 
> it means the number is completely different.
>
> Actual correct octal literal use is vanishingly small. Banning 
> C-style octal literals just makes it so the compiler flags 
> unintended errors like this.
>
> -Steve

Thanks you all for explain.


In my opinion,  use some thing like 0o700 will be a better 
solution compare to template.


More information about the Digitalmars-d-learn mailing list