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,52fd60a337c05842 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-14 10:00:35 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!csulb.edu!newshub.sdsu.edu!west.cox.net!cox.net!newspeer1-gui.server.ntli.net!ntli.net!newsfep1-win.server.ntli.net.POSTED!53ab2750!not-for-mail From: "chris.danx" Newsgroups: comp.lang.ada References: <3D0A1293.5000005@ozemail.com.au> Subject: Re: ada paper critic X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: Date: Fri, 14 Jun 2002 18:00:10 +0100 NNTP-Posting-Host: 80.5.140.234 X-Complaints-To: abuse@ntlworld.com X-Trace: newsfep1-win.server.ntli.net 1024074034 80.5.140.234 (Fri, 14 Jun 2002 18:00:34 BST) NNTP-Posting-Date: Fri, 14 Jun 2002 18:00:34 BST Organization: ntl Cablemodem News Service Xref: archiver1.google.com comp.lang.ada:25958 Date: 2002-06-14T18:00:10+01:00 List-Id: "Andrew Maizels" wrote in message news:3D0A1293.5000005@ozemail.com.au... > Alderson, Paul A. wrote: > > > MY_BIG_BLOATED_PACKAGE_NAME.MY_BIG_BLOATED_VARIABLE_NAME := > > MY_OTHER_BIG_BLOATED_PACKAGE_NAME.MY_BIG_BLOATED_ARRAY_OR_FUNCTION(MY_BIG_BL > > OATED_GLOBAL_LIT_PACKAGE.AND_OF_COURSE_A_BIG_BLOATED_LITERAL); It's considered good style to reserve capitals for constants. > Yeah, this sucks. And having to haul in a dozen different packages to > do anything useful sucks too. Have either of you tried improving readability with local use clauses instead of global ones? e.g. procedure My_Big_Bloated_Procedure is begin My_Package.My_Variable_Name := My_Other_Package.My_Function (var_one, var_two); end My_Big_Bloated_Procedure; goes to procedure My_Big_Bloated_Procedure is use My_Package; use My_Other_Package; begin My_Variable_Name := My_Function (var_one, var_two); end My_Big_Bloated_Procedure; It's a compromise between the two extremes. > > The main point here is that the Ada code above requires one to go and lookup > > what MY_BIG_BLOATED_ARRAY_OR_FUNCTION is. Is it a function or an array? [refers to earlier post] Functions is similar to arrays (but not the otherway A function is a mapping from the domain to the codomain. For programming we compute the answer, but it'd be equally valid to define a function in terms of a set of tuples (inputs, result). Given an input, you can return the appropriate result. e.g. function negate (x : in boolean) return boolean is begin if x = true then return false; end if; return true; end not; Can be given in like this {(false, true), (true, false)}. You can now drop in the array as a replacement, negate : constant array (boolean) of boolean := (true, false); The syntax allows you to replace a function with an array, which you might want to do if the domain is small and the function non-trivial. That might help improve the speed of a program dependant on the function a lot (In some cases it might be possible for the compiler to do even better, eleminating the address computation in the final program, i.e. if x never changes and a never changes, then a(x) is always the same, but that'd only work in certain circumstances). This is done in graphics programming since the cost of computing the address of the element corresponding to an angle is cheaper computing the cosine and sine of that angle over and over. In Ada you don't need to be conciously aware of that by using a different syntax. > > Another issue that is often overlooked is that the computer language can not > > realistically be treated as a stand-alone unit. Sure if you want to argue > > about "what ifs" or are into fantasy writings.... Here is where Ada falls > > by tripping over a steel girder onto its' face into a titanium floor. The > > big issues of why Ada is either dead or in severe decline are: > > > > (And the top ten "Why Ada is dead" reasons are!:) > > > > 1.) Ada is not taught anymore. (Never really ever were that many > > classes for it.) > > Maybe. there is atleast one uni in Scotland (I remember seeing another one, but not sure) teaching Ada and one down south. It might not be taught much but it is still taught. Just found this, don't know how current it is though, http://sw-eng.falls-church.va.us/ajpo_databases/colleges_universities_nonusa .html > > 3.) Ada has no nice string handling capabilities. > > (Yeah yeah yeah library XYZ does...is it in the standard > > distribution?) > > Huh? Ada's string handling is just peachy. It's annoying that there > are six different string types, but everything you could ask for is there. > > C, on the other hand, has the worst string handling of any major > language. C strings are *EVIL*. > > > 4.) Ada has no in-expensive development suits that are easy to use. > > Gnat is easy to use. Not flashy, but easy enough. Plus GNAT can be used with AdaGIDE, emacs, ConTEXT, jGrasp or any other good editor just like every other command line orientated compiler. GUI building tools are slightly lacking, but that situation will get better with time. Chris