|
|
|
|
|
by morelisp
1602 days ago
|
|
> which is nice because it's your internal code and you can always update your own usages without having to worry about compatibility. Unless your services talk to each other or share some external data storage? Which is actually really common? |
|
What I mean is, code that deals with serialization cannot by definition avoid the problem of “what if the data is invalid”. It’s not just enums but every aspect of your type system that must deal with this problem (typically by just throwing an error if the data is invalid, etc.)