For an outsider it looks like a C++ for JVM: A language of endless short-sighted features that's going to bury yourself under it.
It's not even Haskell because Haskell strives to be elegant.
For an outsider it looks like a C++ for JVM: A language of endless short-sighted features that's going to bury yourself under it.
It's not even Haskell because Haskell strives to be elegant.
But let's just look at one element of Scala's truly byzantine iteration logic collection: Iterable
Inherited: Iterable IterableLike Equals GenIterable GenIterableLike Traversable GenTraversable GenericTraversableTemplate TraversableLike GenTraversableLike Parallelizable TraversableOnce GenTraversableOnce FilterMonadic HasNewBuilder AnyRef Any
Implicitly: by traversable2opsby MonadOpsby any2stringaddby any2stringfmtby any2ArrowAssocby any2Ensuringby alternateImplicit
Source: http://www.scala-lang.org/api/current/index.html#scala.colle...
..and now explain what all these aspects actually do! And that's just one small element!
And look at the method set of that thing.. Whoa! Again C++ suddenly seems minimalist.
If Scala is used as "ML with OO features when really needed but not otherwise" it's quite nice, but I would not advise using Scala without a style guide for a multi-developer project.
Considering that Scala ships with BOTH tons of collection types AND tons of useful operations, this seems to be a sane thing to do.
Scala manages ...
- to make both adding a new operation AND adding a new type not suck too much
- to retain the “best” collection type through operations, without duplicating code left and right
Most other languages fail already at point number one. No other language has managed to achieve point number two, let alone both.
Also, the implicits shown are any implicits which can be invoked on Iterable, which includes all implicits which can be invoked on Any.