Re: Code should be selv-maintaining!
| From: | Robert Cummings | Date: | Thu, 01 Sep 2011 06:03:39 +0000 |
| Subject: | Re: Code should be selv-maintaining! | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-314693@lists.php.net to get a copy of this message | ||
On 11-09-01 01:44 AM, Ross McKay wrote:
On Tue, 30 Aug 2011 10:04:54 -0400, Tedd Sperling wrote:That's because JavaScript is broken in some ways. As much as I like JavaScript, some parts of the language were thrown together by flinging crap at a fan and seeing what sticks to the wall... this being a prime example. Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized.I prefer the Whitesmiths style: http://rebel.lcc.edu/sperlt/citw229/brace-styles.php But "style" is really up to the individual -- what works best for you is the "best" (unless it's a team effort or the clients demand).I note on your page that you prefer Whitesmiths (truly ugly!) style even for JavaScript. I'd strongly recommend against that, and also Allman style, due to semicolon insertion. e.g. (randomly selected from Google) http://encosia.com/in-javascript-curly-brace-placement-matters-an-example/ http://robertnyman.com/2008/10/16/beware-of-javascript-semicolon-insertion/ Sure, instances of the problem are minimal, but if you're in the habit of Dangerous Open Brace Placement then you just might fall afoul of it. Besides, my editor (Geany) folds code mostly neatly with K&R :)