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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bc1361a952ec75ca X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-31 04:20:04 PST Message-ID: <3B6693A3.CE81AF84@baesystems.com> Date: Tue, 31 Jul 2001 12:16:51 +0100 From: David Gillon Organization: BAE SYSTEMS Avionics (Rochester) X-Mailer: Mozilla 4.5 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: How to make Ada a dominant language References: <3B6555ED.9B0B0420@sneakemail.com> <9ff447f2.0107301653.c8f5e94@posting.google.com> <3B6624E6.DF734E5C@sneakemail.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: rc3284.rochstr.gmav.gecm.com X-Trace: 31 Jul 2001 12:07:15 GMT, rc3284.rochstr.gmav.gecm.com Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.ems.psu.edu!news.cis.ohio-state.edu!news.maxwell.syr.edu!newsfeed.mathworks.com!btnet-peer0!btnet-peer1!btnet-feed3!btnet!newreader.ukcore.bt.net!pull.gecm.com!rc3284.rochstr.gmav.gecm.com Xref: archiver1.google.com comp.lang.ada:10861 Date: 2001-07-31T12:16:51+01:00 List-Id: Russ Paielli wrote: > I don't see a problem with using "=" for both > assignment AND equality testing (am I missing something?). It would seem so. Assignment and Equality are not equivalent and Ada is very specifically designed to be unambiguous when read, therefore different symbols are required. If you're pushing Ada for safety critical use then the features which enhance unambiguous readability should be seen as co-equal in importance with the other safety-enhancing features of the language. > In Python, > the classic C problem of using "=" when you mean "==" is avoided by > simply not allowing assignment within an if test. Seems like a simple > solution to me. In Ada, the compiler would tell you if you get it wrong. Yes, but if you overload '=' for both assignment and equality then you would still need to mentally disambiguate the operation every time you read what was on the page. Ada's write-once, read-many philosophy means this is 'a bad thing' (tm). > > > What I am proposing would not make programs "less readable." It would > > > make them MORE readable, especially for new Ada programmers. I think that what concerns me most about this is the implication that the average coder out there has had so little exposure to alternate syntax that they're unable to cope with anything that isn't C/C++ like. Every language has syntactic quirks, some shared with other related languages. Arguably there are three big syntactic families-- Basics, Ada/Pascal/Delphi/Modula and C/C++ -- along with a bunch of more individualistic types (Prolog, Lisp, APL) and if comp sci degrees aren't making sure their graduates can cope with even the most common variations in syntax I find that a worrying development (hell, my degree even had a lecture on APL's syntax...). > Because I'd like to have a language that has both excellent fundamentals > AND a clear, minimal syntax. Ada's syntax was specifically designed to be unabmbiguous when read. In certain circumstances that will mean it uses more characters to do the job than other, less safe languages. This isn't a weakness, it's recognised as a strength by the Ada community. > And I'm a compulsive > minimalist, I guess. It bothers me to see ":=" when "=" will do the job, > because it's not minimal. If you're doing safety critical work then unambiguous should win over minimalist every time. -- David Gillon