News for hackers. Stuff that matters.
Re:Why Java folks should look forward to Scala by PaulHoule on Tuesday May 31, 2011 @11:07AM (#2602858)
Java programmers who are looking for "a better Java" would probably be happier with C# than they would be with Scala, although C# doesn't run on the JVM. The "Manifest" mechanism undoes some but not all of the damage done by type erasure in the JVM, so to some extent building a more richly typed language on the JVM is like driving a car with a broken window.

My first Scala program rolled off my fingers and worked the first time. My second one ran headlong into a number of difficulties; people pointed out that the newest version of Scala added some things (not in the book I had) that would make things easier and they were right... sorta.

Now I've been doing fit-and-finish work on a mixed Scala-Java system written by people with PhD's in computer science and personally I think they'd have been better off writing the whole thing in Java.

Re:Why Java folks should look forward to Scala by jonsantana on Tuesday May 31, 2011 @11:26AM (#2602938)
I can definitely relate to that. I was in a discussion a while ago with 2 friends, and I was "the Java guy". After that chat, I decided to go back to C# and give it a second chance, despite my Microsoft allergy ;)

It is clearly a better designed language, which of course "borrowed" a lot (90%?) from Java - and then improved it.

Re:Why Java folks should look forward to Scala by PaulHoule on Tuesday May 31, 2011 @11:59AM (#2603076)
More to the point, Microsoft is continuously improving C#

I was at a conference back in 1997 where we came up with a wish list of features we'd like in Java for high performance computing. We all knew it was useless to ask this from Sun, but we did anyway.

The first version of C# had everything we asked for in it, and even early versions of C# had a 'delegate' mechanism that was, more or less, method pointers.

C# 3.0 introduced support for functional programming; it's certainly not like CaML, but there's a reasonably fluent syntax for real closures -- with a little work in adding syntactic sugar it's not bad.

LINQ is amazing and people have barely scratched the surface of what's possible like it. There's a system for manipulating "Expression Trees" that lets you do LISP-style metaprogramming.

C# 4.0 added covariant and contravariant inheritance for generics and, unlike JVM-based languages, it works the way it is supposed to without any lame workarounds.

Comparing C# to Java as a ~language~ is like comparing modern italian to ancient latin. Changes happen in Java at a glacial rate after a tortuous process that ensures that when JDK 7 hits the streets it's going to be four years obsolete.

That said, the Java platform has an incredible ecosystem around it; using maven gives me the feeling I'm in Manhattan and can plug into an infinite library of amazing stuff.

The .NET ecosystem, on the other hand, feels like being a crossroads town in the middle of Iowa. Occasionally you get something good like NUnit, but open source offerings are anemic or absent, and commercial libraries often come across like ads in the SkyMall catalog. (Often you can implement the 5% of the library you need yourself in the time you'd spent talking to salespeople)

Re:Why Java folks should look forward to Scala by gtani on Tuesday May 31, 2011 @02:16PM (#2603737)
comparing modern italian to ancient latin.

Offtopic but interesting tangent: that's comparing declined languages ( with nominative, accusative, dative etc cases) to languages that use prepositions and other particles instead. Kind of like comparing static type languages vs. clojure and erlang.

Re:Why Java folks should look forward to Scala by bartonfink on Tuesday May 31, 2011 @03:51PM (#2604179)
Latin has prepositions as well, although I see your point. I've made the same case before that Latin is a statically typed human language whereas most of English grammar depends on "runtime" information.