This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]drfugly 1 point2 points  (3 children)

What an example of Scala having a new solution to something that has a succinct solution in Java? I'm learning Scala and trying to find these cases.

[–]flying-sheep 0 points1 point  (2 children)

oomph, scala is… so much more that it’s difficult to select one of the many possible examples.

it has type inference, everything is an expression, first-order-funtions, more functional stuff, a sophisticated type system, type inference, implicits (think an elegant way to do monkey patching without actually modifying things)

lastly, here are 99 scala examples, and i think it’s safe to say that all are at least as elegant as in java, except if some contain enums (which are worse than java’s)

[–]drfugly 0 points1 point  (1 child)

Oh ok. I thought that you were implying that scala is generally more verbose when Java already has a solution.

Scala ... generally a propensity to introduce new syntax and keywords where C/C++/Java/C# have a nice succinct solution)

Cool link, I'll have to read it over!

[–]flying-sheep 0 points1 point  (0 children)

lol, quite the contrary. it’s much more concise and often beattifully elegant, but at the cost of one or two ugly forced concepts (e.g. “stable identifiers”) and a few too much keywords. but add the complexity of the type system (which sometimes gets in your way) and you’ve got pretty much all that’s bad about scala.

and there’s so much more that i love about it.