Skip Navigation

In Scala 3, Use 4 Spaces for Indentation

alexn.org In Scala 3, use 4 Spaces for Indentation

Scala’s coding style advised to use 2 spaces of indentation, but that was before Scala 3’s optional braces, which introduces significant indentation. It’s time for an upgrade of the coding style.

In Scala 3, use 4 Spaces for Indentation
2
2 comments
  • why in the world would any major language choose significant indentation in this day and age?

    • Matters of taste are difficult to argue with!

      I personally don't dislike the new syntax, it does away with a lot of visual clutter and works quite well in practice (though editors could arguably support it better). The bigger issue is that different projects might have different coding styles and so one gets exposed to both no matter one's preference.