3 ms·
"Design patterns are bug reports against your programming language." - Peter Norvig, https://norvig.com/design-patterns/ https://norvig.com/design-patterns/
by dunefox 5y ago
"Design patterns are bug reports against your programming language." - Peter Norvig, https://norvig.com/design-patterns/ https://norvig.com/design-patterns/
- mumblemumble 5y agoWhile I did just criticize Java for lacking some features, I genuinely don't agree with that Norvig quote. It's true that, in a single dispatch language, I sometimes need to use the visitor pattern. And the visitor pattern is a little bit annoying to implement, it's true. But the implication of that Norvig quote is that every single language should implement multiple dispatch, and I simply cannot agree with that. And I suspect that a lot of people who like to invoke that sentiment would not prove to have the courage of their convictions when presented with a situation where Haskell needs a design pattern (sorry, "idiom") in order to work around the fact that it doesn't have dynamic dispatch at all, multiple or otherwise. In general, it's OK for languages to be small and focused, or even to be large and multiparadigm but still draw the line at adding some features. That's not my criticism of Java. My criticism of Java is more along the lines of, Java's a kitchen sink language, and there's nothing wrong (aside from perhaps aesthetics) with being a kitchen sink language, but there are other kitchen sink languages that did a better job of cramming more random crap in more cleanly.