|
|
|
|
|
by hesus_ruiz
457 days ago
|
|
Reading the article I got the same conclusion as every time I approach sum types: they are ONLY useful for addressing malformed JSON structs of hacking BAD data structure/logic design, at least for most business applications (for system-level programs my reasoning is different). The example JSON in the article, even if it may be common, is broken and I would not accept such design, because an action on an object must require the action AND the object. For many year, I have advised companies developing business applications to avoid programming constructs (like sum types) which are very far from what a business man would understand (think of a business form in paper for the first example in the article). And the results are good, making the business logic in the program as similar as possible to the business logic in terms of business people. |
|