scala 3

The `f` string interpolator does not work with Dotty (Scala 3)

If you happen to be using Dotty (Scala 3) and find that the f string interpolator isn’t working, it’s a known bug. (It was implemented with a macro, and the old, experimental macro system has been dropped.) I’m writing this in January, 2019; I don’t know when it will work again. You can use the Java/Scala String.format method until it’s fixed:

val pi = scala.math.Pi
println( "%1.5f".format(pi) )

Scala 3 becoming more “opinionated”

Via Kelley Robinson, one of Martin Odersky’s slides at ScalaDays (May, 2018) is titled, “Realizing Scala’s Potential,” with these bullet points:

  • become more opinionated
  • simplify
  • eliminate inconsistencies and puzzlers
  • build on strong foundations
  • consolidate language constructs to improve: consistency, safety, ergonomics, performance

As Ms. Robinson writes, “Scala was a language toolbox, and that leads to fragmentation. Scala 3 wants to become more opinionated.”