News for hackers. Stuff that matters.
Re:Microsoft takes .NET open source and cross-platform by garrettheaver on Wednesday November 12, 2014 @12:13PM (#8596695)
As someone who has written applications in C#, Java and Scala (amongst others). I'd be curious as what makes you think Scala is a winner relative to C#?
Re:Microsoft takes .NET open source and cross-platform by eloisant on Wednesday November 12, 2014 @02:26PM (#8597583)
One big thing: Immutability by default. That's possible in C#, but it's hard to be sure everything is immutable => http://stackoverflow.com/questions/5097287/how-to-create-imm...

A lot of interesting aspects of Scala are possible only because of immutability.

And a lot of smaller things: * Typeclasses. In Scala you can implement them with implicit parameters, I have no idea how you would do it * Case classes. Again in C# you can implement something that kinda looks one with readonly and just a getter, but it's not as good as you won't get stuff like equality and copy, you'll have to write the boilerplate * Pattern matching, in particular with case classes * Option. You can create your own, or use the Option from FSharp, but all the lib you will use will be returning null all the time. * And more...

Additionally there are aspects that are more of a personal preference, like how the "map" function is called "Select" and "filter" is called "Where", and so on. All functional languages use the same names, the SQL-like naming for manipulating collections is just confusing for me.

At the end of the day, Microsoft tried to build a better Java when they designed C#. And it is indeed better than Java, especially because they moved fast in their versions while Sun/Oracle was terribly slow (why did we have to wait that much for lambdas??). But C# mostly sticks with the same concepts as Java (OOP) while Scala truly embraces both FP and OOP.

Re:Microsoft takes .NET open source and cross-platform by asdf1234 on Wednesday November 12, 2014 @01:12PM (#8597116)
I'd happily switch from Scala to F# but I would miss higher kinds and using implicits for typeclasses.