Hacker News new | ask | show | jobs
by k2xl 3567 days ago
Couldn't agree more.

One of the reasons I enjoyed learning and writing Go was that it sort of encouraged keeping things "tight"

Often times programmers look at lines of code or number of classes written as a source of pride, when we really should be looking at these things as expenditures.

2 comments

Agree. I like Go for the same reason. With Java, there's a weird pressure to spend a week designing class hierarchies and to set up all the factories and abstract factories. In Go - uh, you can do it, but you're going against the grain.
I have been writing Java for 4.5 years and have never felt such pressure. In fact, I have never written a factory and use inheritance sparingly. The problem of Java is the culture of the enterprise bros who worship at the altar of the Holy OOP, not the language itself.
Aren't class hierarchies just 90s OOP code and not specific to Java.
Probably. But Java, growing up as a language at this time, was IMO influenced by this fad more than other (older or newer) languages.
I don't think they are specific to Java technically but they do seem to be part of Java culture.
I agree, I take more price these days in removing lines of code while keeping the same functionality. Less to maintain. Less places for bugs to hide. Again its a principle and there are exceptions, but provided you realize that its a good one to follow.