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 18:25:36 PST Path: archiver1.google.com!news2.google.com!postnews1.google.com!not-for-mail From: byhoe@greenlime.com (Adrian Hoe) Newsgroups: comp.lang.ada Subject: Re: How to make Ada a dominant language Date: 31 Jul 2001 18:25:36 -0700 Organization: http://groups.google.com/ Message-ID: <9ff447f2.0107311725.5af099ae@posting.google.com> References: <3B6555ED.9B0B0420@sneakemail.com> <9ff447f2.0107301653.c8f5e94@posting.google.com> <3B6624E6.DF734E5C@sneakemail.com> NNTP-Posting-Host: 203.106.198.193 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 996629136 5809 127.0.0.1 (1 Aug 2001 01:25:36 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 1 Aug 2001 01:25:36 GMT Xref: archiver1.google.com comp.lang.ada:10904 Date: 2001-08-01T01:25:36+00:00 List-Id: Russ Paielli <18k11tm001@sneakemail.com> wrote in message news:<3B6624E6.DF734E5C@sneakemail.com>... > Adrian Hoe wrote: > > > > Russ Paielli <18k11tm001@sneakemail.com> wrote in message news:<3B6555ED.9B0B0420@sneakemail.com>... > > > > > > Because "=" is the simplest fricking symbol that could possibly be used > > > for assignment. Why is this so hard for Ada programmers to understand? > > > What's so great about ":="? Why not use "$=" or "%="? > > > > "=" means equal. "IF A = 0 THEN" reads as "if A equals 0 then" and > > ":=" means assignment. > > But "x = 4" means that, immediately after the statement is executed, x > indeed equals 4. I don't see a problem with using "=" for both > assignment AND equality testing (am I missing something?). 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. "=" and ":=" are used to differentiate a condition and assignment respectively. Someone in the later post mentioned that "=" has mathematical interpretation and "==" does not. The same goes to ":=". Take a look at the code (proposed new Ada): if A = 0 then A = 1; end if; rather than (the original Ada): if A = 0 then A := 1; end if; Which is clearer? The use of ":=" has the purposeful meaning in avoiding confusions in apes like us. Certainly, there is no big deal with a compiler. > > > What I am proposing would not make programs "less readable." It would > > > make them MORE readable, especially for new Ada programmers. If > > > long-time Ada programmers are unable to see that, I believe Ada will > > > become an obscure niche language, like HAL or Jovial. That would be a > > > terrible shame, because Ada has excellent fundamentals and could become > > > a dominant language. > > > > Honestly, if you think Ada already has excellent fundamentals, why > > border a change? > > Because I'd like to have a language that has both excellent fundamentals > AND a clear, minimal syntax. I want it all. And I'm a compulsive > minimalist, I guess. It bothers me to see ":=" when "=" will do the job, > because it's not minimal. I'm also a fricking perfectionist--just ask my > wife. :-) I am a perfectionist myself and you don't have to ask my wife. You can see the way I work (if you can see now). To achieve perfection, one has to achieve and maintain balance. Too much preferences on one side becomes extremist. Can you have a safe and economic sports car capable of 0-100km/h in 2 seconds and a top speed of 1000km/h? You will have to risk your life to be in the car if such car exists. (In fact, some prototypes have already achieved Mach 1.) If such car exists, it will be a technology breakthrough. A blink of your eye or a jerk in your hand can bring disasters. The example above illustrate this scenario. The compiler will just compile whatever you feed but human is the major contributor of mistakes. This analogy = your proposed Ada. Adrian Hoe > Russ