3 ms·
Actually what I want is just the reading experience of seeing "public Customer GetById(CustomerId id)" instead of "public Customer GetById(string id)" when onl
by SideburnsOfDoom 6y ago
Actually what I want is just the reading experience of seeing
"public Customer GetById(CustomerId id)" instead of "public Customer GetById(string id)" when only some strings (e.g. 64 chars A-Z and 1-9) are valid customer ids.
Compile-time validation would be ideal, but validation at the edges, well before that method, is good enough.
- SideburnsOfDoom 6y agoSee: "Primitive Obsession" https://wiki.c2.com/?PrimitiveObsession https://wiki.c2.com/?PrimitiveObsession Usually cured by using Value objects. I wish this done more in OO code. Could it be better supported in these languages? Yes, for sure. But is it true that "these language do not support such a type" at all? No.