by bitL · 10y ago · 0 comments
Scala allows you to do the same thing in many different ways, and with operator overloading ... the approach you chose to coding defines almost a 'custom syntax' for a project.
Which makes it very hard to read sometimes - you have to infer the 'style' before you can get too far.
To be fair - that's a different kind of 'inconvenience' than C++ from C - but the comparison is pragmatically valid.
The problem is that Scala seems to attract the same type of thinking as C++, where there is a culture that rewards obscure, bizarre syntax.
I mean, why is it an exclamation mark to send messages to actors in Akka?
I need to write code to get things done. I want to spend minimal time figuring out bizarre operator-overloaded library syntax.
Yes. But their cultures are a little different.
C++ I think is 1/2 academic, 1/2 Engineering - with a lot of voices, and a lot of anachronistic 'grey beards' arguing over stuff. Even for Java, James Gosling said 'Sun less less a company than it is a debating society'.
Scala is almost purely academic - but driven by a single person / small team. Scala was not designed to solve an Engineering problem, thus it seems a little 'intellectually masturbatory' (pardon the term).
Scala is way to hard to learn - partly because it's a 'new paradigm' but partly for the reasons aforementioned. So it's only going to make it's way into production for specific entities.
Scala may have a 'big future' if tutorials, training and approaches settle down on commonly accepted standards and practices.
http://www.flotsam.nl/dispatch-periodic-table.html
When I was a teenager, it was fun to do that in C++ until I realized everybody thought it was fun but their version of fun wasn't compatible with my version of fun.
So being able to use this language as a system language, I very much look forward to.
But your mileage may vary.
I don't think it is possible to create a language that can prevent dumb code from being written.
For starters, there's not the syntactic ambiguity (or at least human uncertainty) found so often in C++.
There may be language complexity, e.g. how visibility interoperates can be difficult in weird cases. But I can at least parse it.