IDE influence (was RE: [thelist] ColdFusion: Nested pound si gns)

Jon Haworth jhaworth at witanjardine.co.uk
Thu Nov 15 10:00:25 CST 2001


Grr.

> function {
> 	stuff and another	{
> 		function
> 	}
> }

Aaahhh, the one true brace style (apart from the variable width tab stops
<grin>)

> function
> {
> 	stuff and another
> 	{
> 		function
> 	}
> }

Please take this infected, bastardised, evil mess out into the street and
shoot it.

if (foo) {
  bar
} else {
  fnord
}

function (foo) {
  bar
}

while (foo)
  bar
}

This just makes so much more sense to me. If I'm scrolling up from a closing
brace, I don't just want to see a matching opening brace, I want to see what
it's closing.

If you're using the second style above purely to cut down on missing braces,
may I humbly suggest a

<tip title="Opening and closing elements, braces, etc">
If you open a <td> while you're doing an HTML page, immediately add the
respective </td>, *then* start putting stuff in between them. If you open a
{ while you're coding, immediately add the respective }, *then* start
working on the code that goes between them.

In a very short time this will become second nature and you'll find you're
spending a lot less time chasing those annoying bugs that end up being down
to a missing brace. This will give you more time to chase those annoying
clients for payment :-)
</tip>

Cheers
Jon






**********************************************************************
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or confidentiality'

**********************************************************************





More information about the thelist mailing list