2016-03-27
scala.collection.JavaConversionsが非推奨になるかもしれないらしい
scala | |
めでたい
https://github.com/scala/scala.github.com/pull/509
https://github.com/scala/scala/pull/5064
JavaConvertersのほうはたぶん残ります。
ConversionsとConvertersの詳細な違いはググってください。
一言で言っておくと、非推奨になるJavaConversionsのほうは、暗黙に変換されすぎて意図しないわかりづらいバグを生む可能性があるので、いろんなプロジェクトや規約でも、わりと避ける傾向が大昔からありました。
たとえば、こういう罠 https://gist.github.com/xuwei-k/8870ea35c4bb6a4de05c
(仕事でも、少なくとも新規コードでは使うな、みたいなことを個人的に言っている)
これでもっと積極的にJavaConversions使うのやめろ、って言っていける(๑•̀ㅂ•́)و✧
コメント
トラックバック - http://d.hatena.ne.jp/xuwei/20160327/1459108797
リンク元
- 11 https://t.co/vC1UOAE5V3
- 8 https://www.google.co.jp/
- 6 https://t.co/jJAmFliPUl
- 2 http://b.hatena.ne.jp/
- 2 http://htn.to/ATKKDk
- 1 http://b.hatena.ne.jp/entry/d.hatena.ne.jp/xuwei/20160327/1459108797
- 1 http://b.hatena.ne.jp/entrylist?of=40
- 1 http://feedly.com/i/category/comp
- 1 http://feedly.com/i/category/comp_java
- 1 http://feedly.com/i/my