Re: Code should be selv-maintaining!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11-09-01 01:44 AM, Ross McKay wrote:
On Tue, 30 Aug 2011 10:04:54 -0400, Tedd Sperling wrote:

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 :)

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.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux