News for hackers. Stuff that matters.
Re:Why Scala seems difficult but really isn’t by phillco on Wednesday June 22, 2011 @10:16AM (#2683181)
> The perfect Java replacement would have - local type inference, less verbosity (e.g. public by default), full closures, anonymous blocks, no generics, special syntax for arrays and hashes, operator overloading and the ability of a variable to behave as if dynamic (e.g. leveraging the future InvokeDynamic). I would also completely purge checked exceptions and also get rid of the general syntax for anonymous classes - basically get rid of anything not useful.

Ahem. http://groovy.codehaus.org/

The #1 feature of Groovy in my mind is that there is almost no learning curve whatsoever. All Java code is already Groovy code - you can learn all the dynamic tricks as you go.

Re:Why Scala seems difficult but really isn’t by Lewisham on Wednesday June 22, 2011 @10:25AM (#2683233)
All Java is also a valid subset of Scala, IIRC.
Re:Why Scala seems difficult but really isn’t by dmcg on Wednesday June 22, 2011 @10:40AM (#2683311)
Not true if you mean that their syntaxes are compatible, they are quite different.
Re:Why Scala seems difficult but really isn’t by Lewisham on Wednesday June 22, 2011 @12:50PM (#2683944)
Maybe I was thinking of Groovy.

Sorry, commenting before morning coffee :)

Re:Why Scala seems difficult but really isn’t by devinfoley on Wednesday June 22, 2011 @10:33AM (#2683282)
Scala introduces new versions of collections like Map and List that aren't compatible with Java's versions. The syntactic sugar only works with the Scala Maps.

Meanwhile, Groovy uses Java collections.

Re:Why Scala seems difficult but really isn’t by mark242 on Wednesday June 22, 2011 @11:02AM (#2683405)
Luckily, in Scala there's a JavaConversions package that allows you to cast back and forth from Maps, Lists, Sets, etc, to whatever Scala type you want.

http://www.scala-lang.org/api/current/scala/collection/JavaC...

Re:Why Scala seems difficult but really isn’t by devinfoley on Wednesday June 22, 2011 @04:08PM (#2684972)
Damn, I wish I'd known about this sooner. Thanks!