Collective memory

Rupert Pigott roo at dark-try-removing-this-boong.demon.co.uk
Fri Jul 11 14:20:47 CEST 2003


"Abigail" <abigail at abigail.nl> wrote in message
news:slrnbgt6ls.ab5.abigail at alexandra.abigail.nl...
> Walter Bushell (proto at panix.com) wrote on MMMDC September MCMXCIII in
> <URL:news:1fxw51u.2b4m6zc39wulN%proto at panix.com>:
> ++  Charles Richmond <richmond at ev1.net> wrote:
> ++ <Snip>
> ++ > int  *p, x, y;
> ++ >
> ++ > then:
> ++ >
> ++ >     y = x/*p;
> ++ >
> ++ > is quite different from:
> ++ >
> ++ >     y = x / *p;
> ++ >
> ++ > The first way, "/*" will begin a comment...the second way,
> ++ > you get the integer "x" divided by the integer pointed to by "p".
> ++
> ++  Ouch!! That is one reason code coloring is *important*.
>
> Nope. That's a reason why code colouring is evil. If you write code,
> and it isn't clear what you mean without the use of code colouring,
> you did something wrong. Your code shouldn't rely on a specific code
> colouring scheme to be understandable.
>
> All in my opinion of course.

My preference has been to make heavy use of ()'s to
make the meaning of expressions clear. Also I have
seen people cut & paste expressions from one language
to another without checking the precedence rules. You
know what happened next ! :)

Cheers,
Rupert






More information about the Python-list mailing list