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,1042f393323e22da X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,1042f393323e22da X-Google-Attributes: gid1014db,public X-Google-Thread: 109fba,1042f393323e22da X-Google-Attributes: gid109fba,public From: eachus@spectre.mitre.org (Robert I. Eachus) Subject: Re: Any research putting c above ada? Date: 1997/04/30 Message-ID: #1/1 X-Deja-AN: 238552150 References: <5ih6i9$oct$1@waldorf.csc.calpoly.edu> <5j078b$b25$1@NNTP.MsState.Edu> <5j31lj$qnk@huron.eel.ufl.edu> <335F9D0E.41C67EA6@cacd.rockwell.com> <5jqvbj$bd9@mtinsc05.worldnet.att.net> <5k67fl$eit@mtinsc03.worldnet.att.net> Organization: The Mitre Corp., Bedford, MA. Newsgroups: comp.lang.c++,comp.lang.c,comp.lang.ada Date: 1997-04-30T00:00:00+00:00 List-Id: In article <5k67fl$eit@mtinsc03.worldnet.att.net> Craig Franck writes: > Oh, sure; why should they care if phone service is disrupted? I > think you can argue which snippet is more readable. I think Ada > may be a tad too verbose, and C a smidgeon too terse. And did Ma Bell ever catch it for those major outages a few years ago! (In fact several people on their way to an Ada 9X requirements meeting in Portsmouth, England have fond memories of spending seven hours or so on the ground because of one failure.) But I digress... A better Ada statement of swap would be: procedure Swap (A,B : in out Integer) is Temp : Integer := A; begin A := B; B := Temp; end Swap; I'm not going to count characters, but that feels less verbose than the C not more. > Anyway, is AND more readable than &&? Who knows. I do, lots of us do, and yes, it is. (But "and" in lower case is more readable.) There are some areas where Ada went with conventional syntax, such as the arithmetic operations, and others where it can be oververbose. But in general, the most easily readable option was the one chosen. You have no concept how much Sturm and Drang went on about the notation for types derived from tagged types which do not add state. The final answer was a compromise: type Bar is new Foo with null record; Three keywords to indicate that the type could have been extended, but wasn't. There needs to be something, and a lot of us wanted "with null;" instead of "with null record;" but that's what compromise is about. (And two keywords is the minimum. The first tells you it is an extensible type, the second that it wasn't extended here. If you fold that together, it is tougher to parse as you read.) Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is... -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...