![]() |
Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
> Also, having the opening brace on the same line as the associated line of code takes up less lines. But before you all flame me, no I dont code "command1; command2; command3;" on one line :-). I just think it looks neater. > JMHO, though > Jody When I first learned to program on Windows, Petzold's Programming Windows 3.1 was the main reference. I also learned whole Hungarian notation (where you decorate variable name to death with type information) and it seemed normal for many years. It took me a while to unlearn that habbit, but now, it seems so clear to me what a bad idea Hungarian Notation is. Same thing with curlies. I originally learned the more common
way, but later realized that the
placement actually has more rational arguments to support it (automatically adds whitespace to your code, making methods easier to find, lines up braces, making scopes easier to see). It is mostly a subjective thing, so it is a good thing code-formatters are abundant. One of the things I love about the Python programming language is that there are no curly braces at all. Guido was smart enough to realize that they are not even needed. - mfg
Replies:
|
Sponsored Links
|