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,df854b5838c3e14 X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,df854b5838c3e14 X-Google-Attributes: gid1014db,public X-Google-Thread: 109fba,df854b5838c3e14 X-Google-Attributes: gid109fba,public From: ron thompson Subject: Re: C/C++ knocks the crap out of Ada Date: 1996/02/27 Message-ID: <4gvbulINN1kb@faatcrl.faa.gov>#1/1 X-Deja-AN: 141403064 references: <00001a73+00002504@msn.com> <4etcmm$lpd@nova.dimensional.com> <312515DF.7D3B@cmlj.demon.co.uk> <4gad29$ddp@druid.borland.com> <4 <4geuge$n56@qualcomm.com> <4gspbo$rjm@gaia.ns.utk.edu> content-type: text/plain; charset=us-ascii organization: aos-420 mime-version: 1.0 newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++ x-mailer: Mozilla 1.2 (Windows; U; 32bit) Date: 1996-02-27T00:00:00+00:00 List-Id: dewar@cs.nyu.edu (Robert Dewar) wrote: >Nasser asks > >": This is the essence of the Ada culture: top-down control where >: programmers are subordinates of the lead architects and managers. > >: Other languages -- specifically C++ -- focus on simplifying the >: programming activities while sacrificing some of the ease of control. > >Would somebody from Rational care to explain what aspects of C++ they believe >simplify the programming activity compared to Ada?" > >I am not from Rational :-) > >but here is my answer anyway, just one example. > >If a programmer wants to do a weird unchecked conversion, in C++ you just >go ahead and write a cast and that's the end of it. > >In Ada, you have to make a big production of things, with unchecked_Conversoin, >instantiated it, and then use it. > >Not only is this more work, but you might find some pesky rule saying that >only certain units in the program are permitted to with Unchecked_Conversion >(an example of top down control). Exactly. In our world, we consider that "big production of things" to be the tip off to the savvy reader/maintainer that SOMEthing is going to happen here that may or may not explicitly meet the eye. It is our experience that readers tend to glide the parenthesis, saving them for later study should they feel a need to. Cast via parenthetical indication is often overlooked until about the nth time through it. We like that glaring "... is new unchecked conversion(Something, Something_Else);" The conversion is then an actual call to a hopefully descriptive name that is just a tad harder to overlook then a call with a series of parenthetical notes as to what is being done. We also find that a good spot for commenting is just prior to a function/procedure call, so the habit of commenting is applied to the upcoming cast. It is easy to comment the next call yet forget that we are casting on the fly. The trade obviously is that it makes a few steps more in the process. The one I always enjoy is that it is far less typing in C/C++... As for top-down control, well we just always remember that no matter what the architecture, OS, or language, NObody knows the job like the engineers/programmers. Sure we are suboordinates to the top end, but hey, someone has to be. Besides, they provide us with such a rich variety of laughs... rct The opinion(s) expressed above are mine and mine alone.