Hacker News new | ask | show | jobs
by camus 4653 days ago
Actually, Scala core is pretty small. What you think as operators are methods. What you call case classes is pattern matching , one of the most powerfull feature of Scala along with Actors.

> lots of additional syntax for collection manipulation

Actually using collections in Scala is far more easier than in Java

And i'm not even talking about XML parsing... where you would write 30 lines in java you'll write one liners in Scala. Guess which one is easier to read...

Scala promotes immutability that make code sane.

Scala promotes recursion over loops that makes the code elegant.

Scala promotes experimentation through its REPL.

Scala saves you writing 75% of the java boilerplate, thus promotes maintainable applications.

Scala looking much like Java is a deception but also an necessity for compatibility which Java libs. but the syntax has a total different meaning . That's the genius of Scala. Scala is the guy looking outside the box when Java is trapped in Cargo Culting.

Scala is the future of the JVM.

2 comments

This post comes across like you're incredibly ideologically invested in Scala. I'd suggest that 'the future of computing' in any dimension will take a lot more from practicality and a lot less from theory or ideology.

Specifically, the point about encouraging recursion for more 'elegance' kinda bugs me there. Recursion is more of a natural fit than loops when walking a tree or graph, and is less so when iterating a list, set or map. It's about practicality.

If you're very interested in aesthetics, you'll never like java or even not-hate it. And that's ok.

> Scala looking much like Java is a deception but also an necessity for compatibility which Java libs.

The fact that Scala can look a lot like Java is more for compatibility with Java devs; the code could look a lot different (and idiomatic Scala does) and still be compatible with Scala libs, but supporting code that is familiar to Java devs eases the learning process and encourages adoption.