Regarding the proposed Binray Literals Deprecation

H. S. Teoh hsteoh at qfbox.info
Fri Sep 9 21:46:43 UTC 2022


On Fri, Sep 09, 2022 at 08:54:08PM +0000, Adam D Ruppe via Digitalmars-d wrote:
> On Friday, 9 September 2022 at 20:35:49 UTC, Steven Schveighoffer wrote:
> > Deprecating 0-leading literals to mean octal is and will always be a
> > success.
> 
> Well, yeah, that was a silly syntax. I don't know what the C designers
> were thinking with that.

+1.


> But using 0o solves all those problems.

+1. 0o totally makes sense for octal, just as 0x totally makes sense for
hexadecimal.


> > It runs a simple parser at CTFE which isn't nearly as cheap as the
> > octal parser in the compiler.
> 
> Well it isn't like the cheapness really matters tbh since it is a
> small job.  And it is a kinda cool technique that D can do it. I use
> it in other places too.
> 
> Just compared to the 0x and 0b and a prospective 0o.... you're right,
> it is solidly meh.

+1.


T

-- 
Famous last words: I *think* this will work...


More information about the Digitalmars-d mailing list