DEV Community

Discussion on: What do you think about the idea that "there should be only one way of doing a thing" in programming languages?

Collapse
 
evanoman profile image
Evan Oman

I think it is generally a good principle to strive for, however devs shouldn't ignore the tradeoffs inherent in different approaches. For example, there are a bunch of different ways to write to a file in Java. Are all of them necessary? Probably not. However, each represents a unique set of tradeoffs, some of which may fit a certain application.

As with so many things, it all comes back to your objective function. What is most important in your given application? What negatives are you willing to accept?

Good engineers need to understand these tradeoffs in order to effectively solve problems. Good tools need to expose these different options for engineers to chose from.