debug a reserved keyword (even for enums?)
Kapendev
alexandroskapretsos at gmail.com
Sun Apr 12 09:00:21 UTC 2026
On Sunday, 12 April 2026 at 07:27:21 UTC, libxmoc wrote:
> Same with JSON from some external service that uses `version`.
> Or a database column named `debug`. You are now fighting every
> data format, config file, and third party API that happens to
> use a D keyword.
>
> I hit this with a CSS parser, `align` is everywhere in CSS. I
> hit it with a package manager, `version` is in every manifest.
> Every time it's "oh, just work around it"
>antl
> But these workarounds satck up. They leak into serialization
> logic, binding generators, ORMs etc..
>
>
> People work around this mess constantly, it's friction. And
> every time someone proposes a new feature, the first question
> is "what keyword can we use that won't break the world?" That's
> backwards.
>
> Other languages solved this.
I get it can be annoying, but we have to keep in mind what D is
right now. Other languages can do things differently because they
have a different base to work on. D has a base similar to C in
terms of keywords. It's that kind of language. I don't think it's
that weird to say that you need to find a different solution in
language X, Y and Z.
> Think different - Aristotle
More information about the Digitalmars-d
mailing list