4 ms·
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.
by devinfoley 15y ago
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.
- 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!