:: Re: [DNG] OT: some ancient programm…
Página Inicial
Delete this message
Reply to this message
Autor: Hendrik Boom
Data:  
Para: dng
Assunto: Re: [DNG] OT: some ancient programming language history
On Sun, Jul 26, 2015 at 11:58:55PM +0200, Didier Kryn wrote:
...
>     The affectation operator is := instead of = in C, and the
> comparison are = (instead of ==) and /= instead of != . The bad
> choice of operators, together with other tricks is probably the main
> source of bugs in C programs.


It you only program one language in your life, of course this doesn't
matter much.

But if you frequently change languages, you rapidly find:

= is a bad choice for assignment, because it also means equality.
= is a bad choice for equality, because it also means assignment.

So the only sane choice is to use := for assignment and == for
equality. Forget about = altogether.

-- hendrik