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.
[ Parent
| on HN ]
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!