debug a reserved keyword (even for enums?)

Kagamin spam at here.lot
Sun Apr 12 13:44:52 UTC 2026


On Sunday, 12 April 2026 at 07:27:21 UTC, libxmoc wrote:
> Deserializing XML with an `align` field for your UI? Oh too 
> badn,you have to hack your serializer to make an exception. Or 
> rename the field in your D struct to `alignment_` and map it 
> manually. Or tell your API team to change their schema because 
> D can't handle a common word..

You describe "what is schema?" serialization. It's possible only 
in dynamically typed languages. In statically typed languages 
schema is always present and thus is customizable. Some 
serializers normalize naming conventions.

> 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"

Last I checked CSS used kebab case, so you can't naively parse it 
without normalization of naming conventions at all.


More information about the Digitalmars-d mailing list