DEV Community

Discussion on: How do you feel about braces and semicolons?

Collapse
 
notriddle profile image
Michael "notriddle" Howell

My ideal programming language would have explicit do/end markers for blocks and it would require you to indent it correctly. It serves as redundancy to detect merge-introduced bugs.

def my_function do
  something()
    something_else() # This should be a parse error
end

You can bundle another CLI app with it to use the delimiters to fix up the indentation, like gofmt.

Semicolons, on the other hand, seem like an excessive amount of ceremony unless you're doing something like Rust where omitting them carries meaning. So I guess I'm in the "braces but no semicolons" camp?