What are some of your implicit conversion war stories?


I’m part of a team of researchers analyzing how people use Scala’s implicit features.

One of the areas that we are focusing on is the ways in which implicit conversions have grown into the ecosystem, since at face value they can be considered dangerous, and still our data indicate that they are in most of the biggest libraries that people use every day. In fact, I personally get the feeling that most implicit conversions are carefully introduced into libraries, and just work without the user ever noticing.

Still, we are sure that many people have been baffled by some particularly annoying conversion(s), and have lost many hours trying to find the root cause of the problem (I know I have), and we want to know about them. We have many cases already, but we want to find more interesting examples of implicit conversions gone wrong (or right), which we will generalize and quantify, to see how extended a particular case is.

So please rant away! What was the weirdest conversion you’ve found?