Why did the coder use optional braces? …
This space intentionally left blank
A: To keep their pants up!
The thread is so long, I don’t remember if someone already told that old joke.
In fact, the thread is so long, somewhere near the beginning of it is where someone invented the original joke, although I first heard it as why the fireman wore red suspenders. That was a while ago, hence fireman and not firefighter. It’s funnier with purple suspenders.
I hope dcsobral got a couple of gumdrops back when he put in his two cents. I still match braces with %
in vi.
However, it’s also true that I misconstrued some sample code from a ticket, where the indentation made a difference, and someone had to tell me to shift it left to reveal the bug.
I can already hear myself saying in desperation: Siri, where is the end of this block?
And she will reply: “At Sunnyvale and Fremont! Ha, ha. I can tell you many jokes, just ask me.”
I agree with japgolly, opinionated Scala has cured me of holding opinions.
One idea that hasn’t been floated is to code in github-flavored markdown. Then however it renders is the significant indentation you get, and therefore the inferred block delimiters.
The beauty of that solution is that your code samples are guaranteed to render correctly in the docs.
Since my Parisian friend appreciated this pun, I’ll repeat it here:
This space intentionally Left Bank
That must be an old one, but google doesn’t find the t-shirt for me.