Regarding the proposed Binray Literals Deprecation
Max Samukha
maxsamukha at gmail.com
Sun Sep 11 07:02:51 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
> "
It probably would, but that's not our use case.
>
> ? 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.
As I said, we could do it differently, but binary literals +
comments are just optimal for our use case. There are other cases
where we use them (in the definition of a binary protocol and in
a few other places). We could but don't want to write a parser,
translate into hex, etc. Replacing the literals with templates
would be acceptable but annoying.
More information about the Digitalmars-d
mailing list