6 ms·
Source generators hide too many details from the user. I prefer to have the generated code to be the part of the code repo. That's why I use code templates ins
by vborovikov 1y ago
Source generators hide too many details from the user.
I prefer to have the generated code to be the part of the code repo. That's why I use code templates instead of source generators. But a properly constructed ID type has a non-trivial amount of code: https://github.com/vborovikov/pwsh/blob/main/Templates/ItemTemplates/C%23/ObjectID/ObjectId.cs https://github.com/vborovikov/pwsh/blob/main/Templates/ItemT...
- SideburnsOfDoom 1y ago> a properly constructed ID type has a non-trivial amount of code That is correct, I've looked at the generated code and it's non-trivial, especially when validation, serialisation and casting concerns are present. And when you have multiple id types, and the allowed casts can change over time (i.e. lock it down when the migration is complete) That's why I'd want it to be common, tested code.