[postgis-devel] STYLE

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Fri Dec 19 07:34:21 PST 2008


Obe, Regina wrote:

> This I mentioned to Mark offlist, but since its sort of a STYLE issue I 
> thought I would restate it here.
> 
> I know C programmers are in love with doing this short-cut. 
> 
> if (!binary) free(v);
> 
> I hate it.  It drives me crazy because its too prone to error when 
> someone comes
> by and tries to stuff another statement in there and forgets to put the 
> bracket in.

Aaargh - I really like this and use it a lot :(

The convention is fairly easy to read: if there are no {}s then only the 
next statement is considered part of the if... or else... clause. Does 
that help at all?


ATB,

Mark.

-- 
Mark Cave-Ayland
Sirius Corporation - The Open Source Experts
http://www.siriusit.co.uk
T: +44 870 608 0063



More information about the postgis-devel mailing list