3 ms·
The author is against tagged unions. Ok. https://en.m.wikipedia.org/wiki/Tagged_union https://en.m.wikipedia.org/wiki/Tagged_union
by dfee 4y ago
The author is against tagged unions. Ok.
https://en.m.wikipedia.org/wiki/Tagged_union https://en.m.wikipedia.org/wiki/Tagged_union
- jjice 4y agoThe article felt like it was more against them being used in functions as switches. I don't think (could have missed it) that there was any discussion about using them in transport, because they are necessary there, but deserializing them to richer objects before going into code like was detailed in the article is a good idea IMO.
- Jtsummers 4y agoThe article actually specifies that they are known statically, and not actually dynamic values. They are not coming from databases or other external sources and that's a large part of why it's a code smell. From the article, near the top but below where many people in this thread stopped reading: > its value is always known at compile time. We’re not receiving it as an parameter from an HTTP request or a value from the database.