Ranter
Join devRant
Do all the things like
				++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
				Sign Up
			Pipeless API
 
				From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
				Learn More
			Comments
		
- 
				
				 dbonev2059yThe problem is that this easily becomes dbonev2059yThe problem is that this easily becomes
 
 if (condition)
 Action();
 SomeOtherAction();
 
 And this is hard to spot.
 One of the reasons for the notorious Apple 'goto fail bug' was exactly that. A pair of braces and a line more is a good price to pay for scope clarity.
- 
				
				 Onyx16403459yThis is why I love Sublime Text; open curly braces -> Enter and you have both braces with your cursor in the correct position for adding your code. Onyx16403459yThis is why I love Sublime Text; open curly braces -> Enter and you have both braces with your cursor in the correct position for adding your code.
- 
				
				the lack of curly braces on 1 line code blocks was the source of the major security certificate bug in iOS a while back
- 
				
				 bkrem12689y@CodeOrDie doesn't mean the rest of us can't take advantage of compiler/interpreter shortcuts, JS-focused dev here. In Go for example it's incredibly annoying to have to specify a block for each `if err` because the wasted space accumulates bkrem12689y@CodeOrDie doesn't mean the rest of us can't take advantage of compiler/interpreter shortcuts, JS-focused dev here. In Go for example it's incredibly annoying to have to specify a block for each `if err` because the wasted space accumulates




if (condition)
Action();
Curly braces are not that expensive God dammit!
undefined