3 ms·
Scala's complexity is an issue, but I would not characterize it as a big problem. In any organization that adopts Scala, you should have a coding style guide th
by memracom 13y ago
Scala's complexity is an issue, but I would not characterize it as a big problem. In any organization that adopts Scala, you should have a coding style guide that explains what kinds of constructs are allowed. Start it out with nothing more than Java with less redundancy and then add one thing at a time, making sure that the whole team understands the construct, when to use it, and when it is overkill. The idea is to evolve your way to functional style code rather than dropping it on people's heads from day one. This requires some restraint from senior developers and it requires them to spend more time on educating internally than on coding a masterpiece.
Same thing goes with Akka, start small with a simple Actor System with a supervisor tree no more than two levels. Then work your way step by step into more complex solutions where people will recognize the value of a supervisor tree. Expose the inner workings either by implementing message monitoring in Scala or by diverting the message flow externally to RabbitMQ brokers where you can more easily tap and monitor the message flow.
- ebiester 13y agoWhat about libraries? What if you have to start trying to understand what's going on in Slick? I had two friends who were pairing and were trying to figure out how to get something done. They are both strong java developers and both had scala experience. However, they started diving in and got lost in even understanding what was going on. I believe it was Dijkstra that said (paraphrasing) source code is meant to communicate to humans first and only incidentally machines.
- atto 13y agoI've seen this, too, but Scala's complexity does become more manageable with time. Slick seems to make a trade-off for a very nice API, at the cost of complex underlying code — which you sometimes need to understand when you want to use Type mappers and such. There's several Scala libraries that are on the border of "too clever". One is Play's Iteratees: it's a really nice concept, they take a few days to wrap your mind around. Trying to get a Java programmer to understand them borders on a lost cause.