Conversation
Recommend JavaConverters and migrate usages to `wrapAsJava` and `wrapAsScala`.
8230c5a to
7988a51
Compare
Amend package doc for `scala.collection`.
Remove more mentions of the deprecated thing which shall not be named. Some are in obsolete tests.
|
while reviewing this i'm left wondering why |
|
or maybe there's an overview on JavaConverters somewhere already that explains everything? |
|
@lrytz Funny you should mention that great minds think alike. I don't know if I linked to the paulp refactor that gave us the package object. It comes down to naming. I don't know between |
|
Thanks for clarifying! I'm not decided if we should also deprecate Maybe the Either way, I'll do an overhaul of the documentation. There's some good input on this question on stackoverflow, in particular the comment saying "I think whoever created those classes was stoned". Another thread to pull is the |
|
I think my favorite is to deprecate And improve the documentation. |
|
Just read the new comments. I don't disagree with them. My only intuition is that, as a newbie, I like to |
why even keep those wrappers around at all? |
|
i.e., why keep any JavaConversions around? |
|
I'm all for simplifying further. I also don't see any benefit in providing separate All of the following would be deprecated
The |
|
Although Lukas has a different favorite deprecation on any given day, I'll run with his last instructions. |
|
don't read it as instructions, i'm also not sure if this is where we'll find consensus |
|
lrytz gave me the idea to totally change my mind. What I really wanted to do was mark the undesired implicits with deprecatedImplicitly so that they are not selected by implicit search. It would be especially neat if the behavior of deprecatedImplicitly were not just to emit the warning, but to remove the conversion from candidacy under Calling the methods explicitly is fine. |
Reacting to the trending popularity of JavaConverters, the other mechanisms are deprecated. To be complete, the deprecated implicits could be duplicated and renamed; it would be handy if one could mark them deprecatedImplicitly to emit a warning if they were used implicitly. The public traits bearing the deprecated implicits are marked deprecatedInheritance.
21db05d to
5225cbd
Compare
|
@som-snytt Could you create a ticket for that? :-) |
|
JavaConversions receives mention https://groups.google.com/forum/#!topic/scala-sips/wP6dL8nIAQs Now I understand the test around Map.get. I was actually googling for deprecating implicits. Linked in there is retronym's vote against deprecating JavaConversions. |
|
@lrytz @SethTisue Modulo I broke something, the last commit proposes: JavaConverters contains the extension methods plus the converter methods themselves, so the same import is useful for doing an explicit The implicit conversions from JavaConversions are available in The endgame is to retain JavaConverters, convert.{Wrappers, ImplicitConversions, Decorate*}. Possibly everything except JavaConverters and ImplicitConversions should be private[collection]. WDY'AT? What do y'all think? |
I couldn't find those - did you push your latest work? |
|
Forgot to add the new file. What's not obvious in the last commit is that I went through the docs fixing wrong names. I didn't try to make it gleam with polish; hard to keep so many docs up to date. |
cb6d71f to
e528eb5
Compare
|
Re-submitted in #5109 |
Recommend JavaConverters and migrate usages to
wrapAsJavaand
wrapAsScala.