Regarding the proposed Binray Literals Deprecation
mw
mingwu at gmail.com
Sat Sep 10 18:44:14 UTC 2022
On Saturday, 10 September 2022 at 18:14:38 UTC, Walter Bright
wrote:
>
> and you'll be doing a couple hundred of those at least.
> Wouldn't this be more appealing:
>
> "
> .XXX.
> X...X
> XXXXX
> X...X
> X...X
> "
>
> ? Then write a trivial parser, and use CTFE to generate the
> binary data for the table. Of course, such a parser could be
> used over and over for other projects.
First,the above strings as it is only work for uint8; while
binary literals work for all integer sizes.
Second, why not provide the above "trivial parser" into std lib
(so nobody need to reinvent the wheel), and ask users use it over
years to discover unseen problems and get feedback before
deprecate / remove binary literals?
More information about the Digitalmars-d
mailing list