Hacker News new | ask | show | jobs
by jbooth 4709 days ago
A lot of people (myself included) see Scala as being one step forward, two steps back. Some good features, and then a whole bunch of poorly thought out, wankerish features that can only serve to screw up your code base if some developer gets bored and makes the mistake of using them.
1 comments

> and then a whole bunch of poorly thought out, wankerish features that can only serve to screw up your code base if some developer gets bored and makes the mistake of using them.

I'd love to see an example of that!

Sure, the crazy symbolic operator overloading and a bunch of libraries that encourage you do do things like a :=: b and have it mean something.

Also, there's something about the net sum of the type system where it feels like there are a lot of concepts at work and it's easy to get lots with what type something is, exactly, especially if you didn't write the code and you're just skimming it.

Scala has neither operators nor operator overloading and I don't know any library which "encourages" doing those crazy things.

There are a few places where symbolic method names are used, and in pretty much every case, it is well-established prior art: +, -, *, /, etc for math operations, ! for sending actor messages (Erlang), &, | ,^ for bit operations (C and friends).

Regarding the type system ... well, the alternative is stuff like reflection and casting. Both introduce the possibility of runtime failures and make refactoring and reasoning a lot harder.

Sure, sometimes a well-placed I-assume-this-can-never-fail cast is exactly what one needs, but I'm happy that Scala gives developers another, safer option here.