2 Fixed grammar
source | link

It might be fine if it stays simple like that although personally I don't like it and my preference is to use braces even for the simplest if/else code blocks. It's just tidier for me.

However, where this gets messy is when you have nested if/else loops some with braces some without. A While loop in the middle of all that spaghetti! I've worked with code that bad and it's a nightmare to debug and to understand. This follows on from the first point it's fine when it stays simple and youryou're happy with it, but then other programmers come along and add things to it, probably an if else within the while loop. If it's written clean in the first place then there's less chance of this happening.

The point is to make stuff clear so that other programmers can see at a glance what's right and wrong. Write code so that the pattern looks right and doesn't jar.

The flip side of this is that maybe I could see some people claiming that in certain instances this reads well. If I've got the resource I need do this processing else while I'm waiting for something do this. Even then I stillto me there's still no difference in nesting the while loop inside the else block.

It might be fine if it stays simple like that although personally I don't like it and my preference is to use braces even for the simplest if/else code blocks. It's just tidier for me.

However, where this gets messy is when you have nested if/else loops some with braces some without. A While loop in the middle of all that spaghetti! I've worked with code that bad and it's a nightmare to debug and to understand. This follows on from the first point it's fine when it stays simple and your happy with it, but then other programmers come along and add things to it, probably an if else within the while loop. If it's written clean in the first place then there's less chance of this happening.

The point is to make stuff clear so that other programmers can see at a glance what's right and wrong. Write code so that the pattern looks right and doesn't jar.

The flip side of this is that maybe I could see some people claiming that in certain instances this reads well. If I've got the resource I need do this processing else while I'm waiting for something do this. Even then I still there's no difference in nesting the while loop inside the else block.

It might be fine if it stays simple like that although personally I don't like it and my preference is to use braces even for the simplest if/else code blocks. It's just tidier for me.

However, where this gets messy is when you have nested if/else loops some with braces some without. A While loop in the middle of all that spaghetti! I've worked with code that bad and it's a nightmare to debug and to understand. This follows on from the first point it's fine when it stays simple and you're happy with it, but then other programmers come along and add things to it, probably an if else within the while loop. If it's written clean in the first place then there's less chance of this happening.

The point is to make stuff clear so that other programmers can see at a glance what's right and wrong. Write code so that the pattern looks right and doesn't jar.

The flip side of this is that maybe I could see some people claiming that in certain instances this reads well. If I've got the resource I need do this processing else while I'm waiting for something do this. Even then to me there's still no difference in nesting the while loop inside the else block.

1
source | link

It might be fine if it stays simple like that although personally I don't like it and my preference is to use braces even for the simplest if/else code blocks. It's just tidier for me.

However, where this gets messy is when you have nested if/else loops some with braces some without. A While loop in the middle of all that spaghetti! I've worked with code that bad and it's a nightmare to debug and to understand. This follows on from the first point it's fine when it stays simple and your happy with it, but then other programmers come along and add things to it, probably an if else within the while loop. If it's written clean in the first place then there's less chance of this happening.

The point is to make stuff clear so that other programmers can see at a glance what's right and wrong. Write code so that the pattern looks right and doesn't jar.

The flip side of this is that maybe I could see some people claiming that in certain instances this reads well. If I've got the resource I need do this processing else while I'm waiting for something do this. Even then I still there's no difference in nesting the while loop inside the else block.