by allengeorge · 10y ago · 0 comments
My two biggest day-to-day peeves are:
1) The poor quality of the entire tool chain
2) Immature libraries and ecosystem
Tool chain: from the slow-as-molasses compiler, to the fact that every so often IDEA gives up and refuses to parse parts of our project, to the horror that is SBT, working with Scala just feels* painful. Heck! - my Macbook Pro sounds like it's taking off whenever I start a Scala compile, and if I'm building from scratch? https://xkcd.com/303/Libraries and ecosystem: many opensource Scala libraries feel more like experiments in language wrangling or narrow (exposing only a tiny subset of the underlying features) wrappers for existing Java libraries than well-tested code. Documentation? Almost always spotty. Library community? Spotty. Source? Good luck reading it. Depending on the author's bent it can range from vaguely understandable to downright inscrutable. (On this last point: I've often poked around various Java/Python/Go/C libraries and been able to figure out fairly quickly what's going on. Much less so with Scala.)
Besides those two points - Scala is complex. To a newcomer the language is unfriendly and has a lot of rough edges. You have to build a lot of context to interpret existing Scala code - and much of this context is incidental to the problem at hand. This makes it very tough to incrementally learn about Scala features/syntax and slowly explore an existing Scala code base (especially an opensource one, where authors are more likely flexing their advanced Scala knowledge). And all that syntactic sugar? Terse. Elegant. Unintelligible to a newcomer.
Sorry. /rant over.
Code complexity though, yeah, it's hard (for me, at least) to grasp ordinary for Scala abstraction-heavy, typeclass-heavy code. I would love to see better code exploration tools for Scala.
Over time, I learned slowly to use vals or var, that I don't need to initialize a return value and ship it at the end, and how to build up mapping.
The syntax; I agree with you totally. I just got hired by a company doing Scala and OMG that codebase. I'm seeing all kinds of constructs I haven't used yet.
I still prefer Scala over Java, but there is a high cost to entry.
The library ecosystem is growing every day, and the community is starting to recognize the importance of good documentation. See e.g. the Cats project, with a big emphasis on that.
Code readability in general, rough edges, and things that are difficult for newcomers to read incrementally are precisely why I'm so worried about the syntax being frozen.
So has the situation been reversed now?