[Carpet] [Carpet-darcs] CarpetLib: Replace "!" by "not"
Erik Schnetter
schnetter at cct.lsu.edu
Wed Sep 6 17:09:33 CEST 2006
On Sep 6, 2006, at 08:04:22, Jonathan Thornburg wrote:
>>> On Tue, 5 Sep 2006, Carpet-Repository wrote:
>>>> The Carpet repository at ~darcs/carpet received a new patch:
>>>>
>>>> CarpetLib: Replace "!" by "not"
>>>>
>>>> This patch was recorded by Erik Schnetter
>>>> <schnetter at cct.lsu.edu> at
>>>> 2006-09-04 02:02:13.
>
> I asked:
>>> I'm curious: why are you making this replacement?
>
>> To try and make Carpet's coding style consistent.
>
> Sorry, perhaps I should have phrased my question more explicitly.
> What I mean to ask was/is: I'm curious, what do you see as the
> benefits of using "not" instead of "!" in C++ code? I've never run
> across such a coding-style guideline before...
I'm partly speechless... this question from a person who introduced
the "then" keyword to C++?
I prefer "and" and "or" because I think they look nicer than "&&" and
"||". If pressed for a reason, I would say that these operators cut
short, and hence using a keyword instead of an operator servers to
clarify this difference visually.
I also don't call it a guideline. If you modify or add to a piece of
existing code, then you should use the same style as is already
there; if you write something new, you can decide the style which you
use.
-erik
--
Erik Schnetter <schnetter at cct.lsu.edu>
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from www.keyserver.net.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : /archives/developers/attachments/20060906/aa607fdd/attachment.pgp
More information about the developers
mailing list