Code generation and variable naming
For the longest time, in code, I never understood the purpose of ending identifiers with Id
when they could be ended with ID
. As a concrete example, turns out that in projects with code generation, proto models (in GRPC) are defined with snake case (entity_id). During code generation for HTTP endpoints (JSON models), entity_id is translated to entityId. This means there's at least one situation where being insistent on ID
(as opposed to Id
) makes things more difficult.
In short, when automation is involved, it's easier to rely on a straightforward heuristic to map between different casing of letters in identifiers.