Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Feb 2001 15:20:49 -0800
From:      Brooks Davis <brooks@one-eyed-alien.net>
To:        "Michael C . Wu" <keichii@peorth.iteration.net>
Cc:        j mckitrick <jcm@FreeBSD-uk.eu.org>, freebsd-chat@FreeBSD.ORG
Subject:   Re: bad programming practice?
Message-ID:  <20010223152049.A31038@Odin.AC.HMC.Edu>
In-Reply-To: <20010223143019.E32113@peorth.iteration.net>; from keichii@iteration.net on Fri, Feb 23, 2001 at 02:30:20PM -0600
References:  <20010223180321.A33329@dogma.freebsd-uk.eu.org> <20010223143019.E32113@peorth.iteration.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--6TrnltStXW4iwmi0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Feb 23, 2001 at 02:30:20PM -0600, Michael C . Wu wrote:
> Personally, I think most C/C++ programmers eventually learn to always
> watch for =3D=3D vs. =3D mistakes right when they type the boolean expres=
sion.
> Hence, the trick becomes useless as one advances.

There's also the fact that GCC and other compilers with even vaguly
decent warnings complain about this mistake if you turn warnings on.  I
think it's probably not bad practice in a corprate environment where you
can enforce a style, but it's probably unnecessicary with decent tools.

-- Brooks

--=20
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4

--6TrnltStXW4iwmi0
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6lvBQXY6L6fI4GtQRAmLyAJ9YrhYOWzTrsshr+v1UVy0q4YaLIwCfVCYz
Bm4wCep2kz6JHa2YpD6k/8U=
=qGwJ
-----END PGP SIGNATURE-----

--6TrnltStXW4iwmi0--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-chat" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010223152049.A31038>