Always add braces

Tim Abell ยท August 28, 2018

Reading time: 1 minute

Small matter of code style that I keep coming across.

Whether to write

if (thing) Action();


if (thing)


if (thing)

We should always use the braces to avoid introducing bugs when modifying the code manually or through merge tools.

For the reasons behind this, read the following:

Share: Tweet | LinkedIn
Suggest improvements: page source on github

Get extra content that's just for my list. Get new blog posts to your inbox.
Join me on my journey through software and business.