3 ms·
Why would anyone be worried about being able to write code that more closely matches the problem domain?
by bobbylarrybobby 5y ago
Why would anyone be worried about being able to write code that more closely matches the problem domain?
- rob74 5y agoSpending lots of effort designing your type system to match your problem domain (or rather, what you think is your problem domain) is a pitfall which was made less likely by "classic" Go because the available types were very straightforward. Which also made it easier to refactor your code when you inevitably realized your initial approach didn't match the problem domain that well after all (or the problem domain changed, as it tends to do when you maintain an application over several years). And I totally understand that people are worried having generics will change this.
- baby 5y agoReadability, complexity, security
- jeltz 5y agoBecause generics rarely help with that. I love generics for writing libraries and for giving me libraries which are easy to use but my business logic is almost never generic. Most problem domains I have worked in have not been very generic.