From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1d321b3a6b8bcab2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-01-13 04:38:58 PST Path: nntp.gmd.de!newsserver.jvnc.net!howland.reston.ans.net!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!ghost.dsi.unimi.it!maya.dei.unipd.it!sirio.cineca.it!serra.unipi.it!swidir.switch.ch!epflnews!masg1.epfl.ch!gasser From: gasser@masg1.epfl.ch (Laurent Gasser) Newsgroups: comp.lang.ada Subject: Re: "Subtract C, add Ada" Date: 13 Jan 1995 12:38:58 GMT Organization: Ecole Polytechnique Federale de Lausanne Distribution: world Message-ID: <3f5s92$3id@info.epfl.ch> References: <3etund$hnr@miranda.gmrc.gecm.com> <3f4mbe$rud@cronkite.seas.gwu.edu> NNTP-Posting-Host: masg14.epfl.ch Date: 1995-01-13T12:38:58+00:00 List-Id: In article <3f4mbe$rud@cronkite.seas.gwu.edu>, dobrien@seas.gwu.edu (David O'Brien) writes: |> R.A.L Williams (bill@valiant) wrote: |> : My experience of writing software and running software projects in C |> : highlights four common low-level C errors: |> : 1. = instead of == and vice versa |> |> I have to wonder. What if C defined the logical equals operator to be |> "=" and the assignment operator to be ":=" just like Ada, Algol, Pascal, |> Modula-x, etc? Would this error still exist??? The problem is in the language definition, not in the choic of symbols. C is one of the rare language I use to allow having an assignment after the if statement. All other languages only allow for a boolean test. I never saw a good reason for allowing this. -- Laurent Gasser (gasser@dma.epfl.ch) Computers do not solve problems, they execute solutions. I know very few ideas worth dying for, none is worth killing.