4 ms·
All Java is also a valid subset of Scala, IIRC.
by Lewisham 15y ago
All Java is also a valid subset of Scala, IIRC.
- devinfoley 15y agoScala 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.
- mark242 15y agoLuckily, 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/JavaConversions$.html http://www.scala-lang.org/api/current/scala/collection/JavaC...
- devinfoley 15y agoDamn, I wish I'd known about this sooner. Thanks!
- dmcg 15y agoNot true if you mean that their syntaxes are compatible, they are quite different.
- Lewisham 15y agoMaybe I was thinking of Groovy. Sorry, commenting before morning coffee :)