Hacker News new | ask | show | jobs
by sbilstein 4653 days ago
I'd argue Scala is much more readable than Java with some effective practices. Type inference (where appropriate) cuts down on distracting text, operator overloading is great when used judiciously, for comprehensions, etc are all great features.

Just because Java requires explicit typing all over the place does not make it easy to read, especially when I'm trying to decipher what the ResourceBuilderFactoryFactory class is doing in my enterprise grade codebase. There is cognitive load in parsing tons of text to express simple concepts, just as there is cognitive load in deciphering a bunch of random symbols doing something complex. Scala with discipline lets you choose somewhere in between; Java gives no choice.

2 comments

For startups with small, disciplined teams, Scala is manageable, sure. But once things go "enterprise" and much of your ongoing development gets outsourced, and it will, all bets are off. Maintainability is THE great equalizer.
> But once things go "enterprise" and much of your ongoing development gets outsourced, and it will, all bets are off.

That has nothing to do with language; Java for which development is outsourced and maintenance goes in house is pretty much a nightmare, too.

But that's pretty much a "myopic development practices -- including outsourcing development of code you are going to need to end up supporting in house -- will blow up in your face problem", and not an issue relating to any particular language or platform.

Chances are, if you have the authority to make enterprise-level language/platform policies, you also have the authority to make enterprise-level decisions on whether and when to outsource development of software, so it makes sense to just do the latter right than to make an otherwise second-rate choice on the former to make up for doing the latter poorly.

It's my personal goal at the current company I'm at to see Scala grow to be respected as an "enterprise" language. The startup where I learned Scala had a small disciplined team with lots of mentorship that meant almost everyone developed some very good Scala practices.

If code is becoming unmaintainable because of outsourced development, does that not have more to do with how we communicate to these external developers? Bad code is bad code in any language.

Type inference is great, and is part of why I consider Scala to be "one step forward, 2 steps back" rather than just a total loss.

As far as the rest, we'll just have to disagree, I stated up front that it was an opinion :)

Haha, well what you said is true, but your spin on it I disagree with. How about "one step forward, a couple steps to the side"?