lmika
lmika

Listening to the ATP #491 discussion on code formatting right now. I guess I’m not the only one that converted from BSD braces to K&R because it was the style used by “everyone else” (Go requiring this style helped a lot here). I will stand on liking the cuddled “else” though.

|
Embed
Progress spinner
chriskrycho
chriskrycho

@lmika basically as soon as Prettier, elm-format, and rustfmt appeared I landed in camp “I have preferences about formatting but my strongest preference of all is to never argue about formatting again.”

And even so: non-cuddled else is an abomination; what is John thinking?!? 😂

|
Embed
Progress spinner
In reply to
lmika
lmika

@chriskrycho Sounds a lot like the Go community. The Go compiler requires K&R braces, which is a bit different, but every project pretty much expects the use of gofmt to format any code. I do like this practice a lot: easy to defer to a tool vs. argue about code formatting.

That said, I too find the non-cuddled “else” just strange. Also, for some anecdata, in my 14 years in the industry, I’ve never seen it used on the projects I worked on. Maybe using cuddled “else” is just how we roll code in Oz. 😁

|
Embed
Progress spinner