Thread: formatting
View Single Post
Old 03-31-2003, 10:02 PM   #21 (permalink)
Epsilon
Regular Contributor
 
Epsilon's Avatar
 
Join Date: Mar 2003
Location: Las Vegas, NV
Posts: 127
Epsilon is on a distinguished road
Quote:
Originally posted by Travis Dane
If we had this about ten times, It would take in alot of extra
space with no reason whatsoever, Just because we can't
remember braces?

To get to the point: Style #3 is the best, If you can't remember
to put braces or not than don't use it, Otherwise it would save
you space, Even though it is not much it IS space.
I recently finished up a Web application for a client that was just under 7000 lines of code. Out of curiosity, I wrote a little script to count the number of times I could have gotten away with leaving the braces off a statement.

The total "space" savings would amount to less than a kilobyte. So I guess if I was really anal about the size of my script I could reduce it from 269K to 268K.

Nah, I think I'll leave the braces in.

JJoSA made a good point that it can make debugging a nightmare.
__________________
--Epsilon--
Epsilon is offline   Reply With Quote