Pfft, thought I'd glance at GitHub issues right off the bat this morning and it's 0 days since the last issue related to strong typed identifiers.
Hate those damn things
Discussion
Pfft, thought I'd glance at GitHub issues right off the bat this morning and it's 0 days since the last issue related to strong typed identifiers.
Hate those damn things
@jeremydmiller i am curious. link?
@simoncropp https://github.com/JasperFx/wolverine/issues/2465
The problem is that they're neither fish, nor fowl, and you almost always have to treat them specially by either unwrapping or wrapping the real value
@jeremydmiller would it be easier if strong typed ids were a first class feature in .net?
@simoncropp Only if there was a VB-esque concept in the language itself as the types being automatically convertible.
Honestly, I doubt it.
@[email protected] @[email protected] I'm not a fan in general for a lot of other reasons, but the fact that TypeScript types only exist at compile time (and you can tell the compiler to ignore them) does make things like strongly typed IDs easier to deal with. Generated code can just throw the types away, while user facing code gets type safety (for the value of safety TS allows at the best of times) on ID types without run time impact. Haskell allows alias types that have similar properties.
It's not really the kind of thing the dotnet type system is set up to deal with gracefully though.