@jorgeortiz85 Chapters 5,7 and 8 spread the suggestions around...
2011-09-01 06:42:05数ヶ月後・・・
Why scala.collection.JavaConversions is Evil: val m: Map[Foo, Bar] = ... m.get(string) // Returns Option[Bar], right? Nope, null!
2012-01-22 10:08:28@JorgeO I don't get null from that. Is your underlying Map a java.util.Map?
2012-01-22 16:38:50@jorgeo You must be using it typed as a java.util.Map. Can you be more specific about the problem? /cc @channingwalton @debasishg
2012-01-22 19:35:51@milessabin @jorgeo @channingwalton @debasishg This gist shows it working for the correct type of Map: https://t.co/0ndYwlQY
2012-01-22 19:52:01@seanparsons @milessabin @channingwalton @debasishg The point is that if the types are wrong (Foo != String), then you get a null.
2012-01-22 21:43:38@JorgeO If you have a Java Map then get can return null ... why the surprise? /cc @seanparsons @channingwalton @debasishg
2012-01-22 21:45:05@milessabin Because I think I'm using it as a Scala map. Fuller example: https://t.co/tII5t2ck
2012-01-22 21:48:56@JorgeO @milessabin Right, because of the implicits conversions, that makes more sense, have to admit I generally don't import all of it.
2012-01-22 21:53:13@JorgeO OK, gotcha. Yes, well, with the benefit of hindsight we know that those conversions were undesirable, hence JavaConverters.
2012-01-22 22:01:54@milessabin It should go through a deprecation and removal cycle. Too many Google results still suggest JavaConversions.
2012-01-22 22:05:54@seanparsons I generally don't import any of it (I've been bitten too many times), but people I work with don't know not to.
2012-01-22 22:06:55@JorgeO Right, I do agree that it should be deprecated and then removed however.
2012-01-22 22:19:27