Regarding the proposed Binray Literals Deprecation

Don Allen donaldcallen at gmail.com
Sun Sep 18 01:50:06 UTC 2022


On Saturday, 17 September 2022 at 21:39:59 UTC, Walter Bright 
wrote:
> On 9/17/2022 10:22 AM, Loara wrote:
>> The point is that a lot of people comes from C/C++ and they're 
>> used to use binary literals
>
> Not really. C11 doesn't have binary literals. C++ added them 
> quite recently.

That's right -- binary literals are not part of the official C 
language, not now (as defined by C11) and not in the past. The 
language, as described in the second edition of K&R (1988), does 
not have them. Nor do they appear in the fifth edition of 
Harbison and Steele.

But compilers such as gcc and clang add them as an extension and 
the working draft of C2x does include them.

So while using C's history and current state as an example of why 
D ought to have binary literals is a non-existent argument, C++ 
recently added them, as you said, and C seems to be heading the 
same way.







More information about the Digitalmars-d mailing list