Brackets are awesome, don't use them

5 pointsposted 7 hours ago
by thunderbong

4 Comments

thesuperbigfrog

6 hours ago

The popular alternative to brackets is "begin" "end" markers you see in Ada, Ruby, and Pascal:

Ada: https://learn.adacore.com/courses/intro-to-ada/chapters/impe...

Ruby: https://ruby-doc.org/docs/ruby-doc-bundle/Manual/man-1.4/syn...

Pascal: https://en.wikibooks.org/wiki/Pascal_Programming/Expressions...

For most of these, "begin" is equivalent to "{" and "end' is equivalent to "}".

However, I prefer Ada's more explicit "end $THING;" because it gives more context about what is ending and many Ada compilers can also check that $THING matches the corresponding "begin" block.

user

7 hours ago

[deleted]

ezekg

7 hours ago

tl;dr: author likes Ruby-style languages over C-style. But a blanket proposal for all languages to drop C-style is just odd.

marssaxman

5 hours ago

It's funny to observe that generational shift: I would have said "Pascal-style".