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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3ccb707f4c91a5f2 X-Google-Attributes: gid103376,public From: Ken Garlington Subject: Re: Once again, Ada absent from DoD SBIR solicitation Date: 1996/10/11 Message-ID: <325E5757.3C99@lmtas.lmco.com>#1/1 X-Deja-AN: 188791067 references: <325D40E0.41C6@hso.link.com> content-type: text/plain; charset=us-ascii organization: Lockheed Martin Tactical Aircraft Systems mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 2.02 (Macintosh; I; 68K) Date: 1996-10-11T00:00:00+00:00 List-Id: Mitch Gart wrote: > > Stanley R. Allen (s_allen@hso.link.com) wrote: > : Mike Stark wrote: > : > Actually, while Java superficially looks like C++, it is semantically > : > more like Smalltalk or Ada 95. Most of the truly nasty features of C > : > are removed (such as pointers -- the only pointers in Java are > : > references to objects, and pointer address arithmetic is not allowed). > > : Concerning semantics, you are certainly correct. > : But readability is very much a syntactic issue, and > : this is a big minus for Java. Its "superficial" > : similarity to C++ is the problem, especially for > : large long-lived systems. > > There are things about Java which are more readable than Ada. I know > this is an old argument but in Java you have > > obj.func(param); > > and in Ada it's > > func(obj, param); > > To me the Ada is less readable, you have to look up the function's declaration > and the parameter's type declaration and think a little bit to know whether the > call is dispatching or not. Why not Func (Dispatching_On => Obj, With_Parameter => Param); which says explicitly what you want it to say, without having to look at _any_ declarations? I don't see why "obj dot func" is more readable! > Ada package notation makes it worse: > > pkg1.func(obj, param); > > can really call the code in the body of pkg2, instead of pkg1, if there is > dispatching. To me in this case the Ada syntax is lying to the person who > is reading the program. It makes the code hard to read correctly in my opinion. > This says "use" clauses should be used wherever there is dispatching, but as > we know a lot of Ada coding standards frown on "use" clauses. However, the _language_ doesn't frown on it. If you think the use clause makes your code more readable, then use it! That's what it's for! That's one of the wonderful things about Ada, in my opinion. If you want to make the dispatching explicit, you can do it. If you want to hide it as an unnecessary implementation detail, Ada lets you do that too (at least to some extent). > > - Mitch "just my opinion" Gart -- LMTAS - "Our Brand Means Quality" For more info, see http://www.lmtas.com or http://www.lmco.com