Feedback sought: Optional Braces

Leaving aside for a moment which indentation width is best, I think the challenge of changing from e.g. 2 to 3 spaces is exaggerated.

I might be wrong, but I think what will probably happen is that people will start writing new code, and in particular new source files without braces, rather than going around and changing old code. Having editors indent 3 spaces by default in new source files wouldn’t be too hard. For existing code, I think most IDE’s infer the indentation based on what’s in the current file.

Everyone won’t follow that standard anyway. When I was new to Scala, I always indented 4 spaces, because that’s what I did in all other languages, and I mostly used sublime, which indented 4 spaces by default. There are other examples:

Changing the standard would be a incremental process, and not everyone would follow it. That doesn’t really make it undoable.

2 Likes