Originally posted by: Mark R
#2 - it's so much easier to read.
Although for mundane stuff I'll often do things like this:
finally { myStream.Close(); }
it's easier for YOU to read perhaps, but not for the second half.
i used to do #2 and switched over, can't remember why, but ever since i switched over, it's been much easier for me to read. and i think
{
}
doesn't make it easier to debug, because your line of codes aren't going to be just 1 or 2, so you won't be able to sit there and match which bracket goes with which by eyeballing it.
it all comes down to the programmer's preference of which looks nicer, because they're both clean.
on the other hand this wouldn't ble clean
if (clean) { blah(); blah2(); ............................................ blah3(); blahend(); }
i do however do those if i only have 2 or 3 statements, i just rather not waste lines, and it shouldnt be hard to read