Small sample of Scala WTFs circa 2014 from the REPL (many taken from Paul Phillips talks on the Scala Collections library):
scala> List("a", "b", "c").toSet // the only reasonable line of code in here
res1: scala.collection.immutable.Set[String] = Set(a, b, c)
scala> List("a", "b", "c").toSet() // seen this when learning Scala first time. ROFL.
res2: Boolean = false
scala> List(1, 2) ::: List("a", "b") // it'd be funny if you didn't care.
res3: List[Any] = List(1, 2, a, b)
scala> List(1, 2) ::: List(3, 4.0) // sad panda
res4: List[AnyVal] = List(1, 2, 3.0, 4.0)
scala> List(1, 2, 3) contains "wtf?" // LMAO if it didn't hurt so much
res5: Boolean = false
scala> Double.MaxValue - Int.MaxValue == Double.MaxValue // I don't even …
res6: Boolean = true
scala> 555555555.round // :)
res0: Int = 555555584
Susan Potter
Quant
Work with me
I spent the first half of my career building risk models and market data infrastructure at BNP Paribas, Bank of America, and Citadel, then fourteen years shipping production systems at scale. Now I bring both sides to quantitative trading. If you're a trading firm, family office, or fund looking to tighten the connection between your research ideas and your production trading systems, whether that's building validation pipelines, formalizing signal logic, or getting microstructure analytics into a deployable state, I'd like to hear what you're working on. Reach me at me@susanpotter.net.