Hacker News new | ask | show | jobs
by tsotha 5404 days ago
I hope that's an exaggeration. I'm just starting to look into scala as a directional language for our team (new projects), but if real-life scala code tends toward that sort of ugliness we'll stay with java.
3 comments

If you can use the map function from collections and if you understand why function with one argument has the following signature[1]:

    Function1 [-T1, +R]
Then you should be fine

[1] Explanation here: http://stackoverflow.com/questions/5277526/real-world-exampl...

Scala code http://engineering.foursquare.com/2011/01/21/rogue-a-type-sa...

Take a look at the APIs of some of the libraries you are likely to use, before you get scared off by how complex the syntax can potentially be.

Define real-life Scala code.

It is absolutely possible to write code like that in Scala.

It is also possible to write code that is to read and understand and which makes perfect sense.

It all depends on the programmer.

Well, when I say "tends toward" what I mean is if I have an average team of programmers, when I look through the code a year after the project starts, is this what I'm going to find?

I realize expert programmers can write legible code in any language, in the same way Tiger Woods can best me over 18 holes using only a five iron. But there are some languages, like C++, that tempt mediocre programmers into writing illegible code. That's a big strike against, IMO.

I doubt you'll have to worry about that specific problem with a team of average programmers. They won't be naming new functions with pure symbols, which is what that code represents. Just don't tell them Scala allows that and you should be fine. If they figure it out, outlaw it and require the use traditional descriptive English camelcase.