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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7b5615402713dcbb X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.74.6 with SMTP id p6mr2818571pav.5.1346163754273; Tue, 28 Aug 2012 07:22:34 -0700 (PDT) Received: by 10.224.186.143 with SMTP id cs15mr8929343qab.3.1346163754114; Tue, 28 Aug 2012 07:22:34 -0700 (PDT) Received: by 10.236.170.7 with SMTP id o7mr1125575yhl.3.1346163754089; Tue, 28 Aug 2012 07:22:34 -0700 (PDT) Path: a5ni18361pbv.0!nntp.google.com!news1.google.com!r1no2509735qas.0!news-out.google.com!da15ni36163658qab.0!nntp.google.com!r1no2509730qas.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 28 Aug 2012 07:22:33 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=83.150.124.2; posting-account=QrZwxQoAAAByl3YAWTpexAk3yBYyZMHn NNTP-Posting-Host: 83.150.124.2 References: <8bfbf709-18ac-43cd-b037-ce47adde96c2@googlegroups.com> <1dy5xgqtdqpp6$.qio4t8fjk8b5.dlg@40tude.net> <513d6efb-6aad-4013-8b21-37c75aa6aaf7@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Ada and Java/C++ From: kalvin.news@gmail.com Injection-Date: Tue, 28 Aug 2012 14:22:34 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-08-28T07:22:33-07:00 List-Id: tiistai, 28. elokuuta 2012 13.50.41 UTC+3 Brian Drummond kirjoitti: > On Mon, 27 Aug 2012 19:14:39 -0700, Adam Beneschan wrote: >=20 >=20 >=20 > > On Monday, August 27, 2012 4:16:39 PM UTC-7, Randy Brukardt wrote: >=20 > >=20 >=20 > >> I agree with you here (but also see below). But the syntax of a >=20 > >> language is a very important part of the foundation of the language. >=20 > >> Ada's syntax is designed to minimize the possibility for inadvertant >=20 > >> errors, which is not the case with the C syntax.=20 >=20 >=20 >=20 > > Hmmm ... I guess it depends on just how much of the syntax the OP is >=20 > > thinking of keeping. I'd think that if we're just talking about the >=20 > > "look and feel", one could probably develop a language that has the >=20 > > functionality of Ada but using C-like keywords and operators, without >=20 > > compromising safety. =20 >=20 >=20 >=20 > I suspect you are onto something here ... I believe the OP meant not the= =20 >=20 > syntax, but the lexical level of the language. A lot of the "feel" of a= =20 >=20 > page of source comes from the tokens used, rather than the order of their= =20 >=20 > arrangement.=20 >=20 >=20 >=20 > Changing begin and end to { and } does not change the syntax a jot*, but= =20 >=20 > makes the language look a lot more like C. And I suspect THAT is what the= =20 >=20 > OP intended.=20 >=20 > (I appreciate that would leave a lot of work around things like=20 >=20 > conditional statements, to make them "look right" while preserving their= =20 >=20 > syntactic advantages. But bear with me...) >=20 >=20 >=20 > Perhaps it could be run through a simple macro preprocessor and turned=20 >=20 > into Ada. >=20 >=20 >=20 > > I'm not saying it's a good idea. Personally, if >=20 > > someone sent me a compiler for a language like that, I wouldn't just >=20 > > delete it from my system, I'd print it out just so that I could run it >=20 > > through a shredder and then stomp on it. >=20 > >=20 >=20 > > But some changes, like using [] instead of () for array indices or { } >=20 > > instead of begin/end or expressing type conversions as (type)expression >=20 > > instead of type(expression), wouldn't seem to have any negative impacts >=20 > > on safety. (Just on aesthetics.) =20 >=20 >=20 >=20 > And refactoring, when you substitute evaluation for lookup, or vice versa= . >=20 >=20 >=20 > > The point is that if the OP's premise is correct--that Java is popular >=20 > > because it borrows from C syntax even though it eliminated some of the >=20 > > unsafe and error-prone things from the language, then in theory, a >=20 > > mutant Ada language with C-like syntax could do the same. If I were >=20 > > induced by a very large sum of money to help develop such a language, >=20 > > I'd want to make some changes like (1) making assignment statements >=20 > > statements rather than expressions, ... >=20 >=20 >=20 > While agreeing with your list, I would go further and simply keep Ada's= =20 >=20 > syntax largely intact*; restricting the changes to what can be=20 >=20 > accomplished at the lexical analysis stage. >=20 >=20 >=20 > * I don't see that transforming "a +=3D b" into "a :=3D a + b" etc would= =20 >=20 > break this model... >=20 >=20 >=20 > - Brian Brian, you were able to express my intention more clearly that I could do. = And the idea of Jada-to-Ada translator is also a good for proof-of-concept.= Ultimately the translator needs to be scrapped, as Ada is still a four let= ter word for many programmers (pun intended). - Calvin