Hacker News new | past | comments | ask | show | jobs | submit login

> I've always wondered about this argument. Haven't modern Java IDEs more or less automated away the boilerplate?

They may automate some of the typing of boilerplate, but that just means the language you are entering isn't the same language you are reading, which is another problem.

The boilerplate is still there, and its still in the way.

> Sure, you have a little more code to look at. But frankly, sometimes this can improve readability vis-a-vis excessively concise and overloaded syntax.

IME, its more often the case that the boilerplate that Java requires makes code hard to read than that the conciseness that Scala permits (but generally does not require) makes it hard to read. And, since the concise options in Scala are generally options, a programmer who is aware of a case where being maximally concise impedes clarity can opt for a more explicit expression, whereas the Java-required boilerplate isn't optional, so even if the programmer is aware of it getting in the way of readability, they can't eliminate it.




> that just means the language you are entering isn't the same language you are reading

I don't think that's true. Your phone has an autocomplete function for text input. You're still typing and reading the same language.

> a programmer who is aware of a case where being maximally concise impedes clarity can opt for a more explicit expression

By the same token, readers are held hostage by the poor decisions of overly concise Scala programmers. This is not theory, it really happens a nontrivial amount of time. You can blame the programmer if you want, but it's a point for Java readability.


A bad programmer can write code with poor readability in any language. That's no excuse for a language that makes clear, concise code impossible.


> a language that makes clear, concise code impossible

Now you're simply overstating the case. Why?

This is a perfect example of my claim. There is this emotional component to the "Java boilerplate" argument that belies rationality. There is some other unstated reason advocates want Scala and are fitting the argument to that conclusion. Because it's cool? Big fish small pond syndrome?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: