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 01:03:52 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeed.berkeley.edu!news-hog.berkeley.edu!ucberkeley!newshub.sdsu.edu!newspeer.cts.com!galanthis.cts.com!127.0.0.1.MISMATCH!not-for-mail Sender: kst@king.cts.com Newsgroups: comp.lang.ada Subject: Re: How to make Ada a dominant language References: From: Keith Thompson Date: 31 Jul 2001 01:03:52 -0700 Message-ID: X-Newsreader: Gnus v5.5/Emacs 20.3 NNTP-Posting-Host: 209.68.192.180 X-Trace: 996566632 nntp.cts.com 283 209.68.192.180 Xref: archiver1.google.com comp.lang.ada:10838 Date: 2001-07-31T01:03:52-07:00 List-Id: 18k11tm001@sneakemail.com (Russ) writes: [...] > 1. Eliminate the "end" keyword and make the indentation structure an > inherent part of the syntax, as in Python. I personally don't mind Python's use of indentation to indicate program structure, but a lot of programmers despise it. You propose to alienate those programmers for no good reason, while making it far less clear where a construct ends. > 2. Eliminate the requirement for a semicolon after each executable > statement, but allow semicolons for combining multiple statements on a > line, as in Python. Ada is a free-form language. Requiring a semicolon on each statement eliminates the need for a special syntax for splitting a single statement across multiple lines. > 3. Use "=" rather than ":=" for assignment, as in Python. (Use "==" > for equality testing if necessary to avoid confusion with assignment.) Assignment and equality testing are two different things. They should look different. > 4. Use "=" instead of "=>" for passing arguments by named association, > as in Python. "Proc(Foo = Bar)" is already a valid Ada procedure call; it passes the value True if Foo and Bar are equal, False if they aren't. > 5. Reverse the backward declaration syntax. For example, use "integer: > count" instead of "count: integer", or use "integer in: count" instead > of "count: in integer". It's backward only if you're accustomed to declarations that put the type first. For anyone accustomed to Ada-style (or Pascal-style) declarations, they look perfectly natural. Anyone else should be able to get used to it quickly enough. > 6. Eliminate the "is" keyword. Right. Just imagine the man-years that have been wasted typing those two letters. How would you declare a derived type ("type Foo is new Bar;")? > 7. Let "use" imply "with" so the tops of files need not be cluttered > with both "with" and "use" for the same package. "with" can be applied to any library unit. "use" can be applied to any package. Not all library units are packges, and not all packages are library units. > count: integer := 0; -- old syntax > > integer: count = 0 -- new syntax They're both about equally clear; the old syntax has the advantage of being what we've been using in Ada for the past 20 years or so. As someone else pointed out, all programming languages are artificial. There are many choices to make in designing a programming language; often neither possible choice is any more or less "natural" than the other. Seriously, how many programmers do you know who (1) dislike Ada because of its syntax, *and* (2) would become Ada enthusiasts if it were changed in accordance with your suggestions? I suggest there are far fewer than you think. I would also suggest that accusing those who disagree with you of being unintelligent is just about the worst possible way to convince anyone that you're right. After all, I'm always right, but there are plenty of intelligent people who disagree with me. 8-)} -- Keith Thompson (The_Other_Keith) kst@cts.com San Diego Supercomputer Center <*> Cxiuj via bazo apartenas ni.