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,912597791e813f68 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-04 09:35:09 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!wn14feed!wn12feed!wn11feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc53.POSTED!not-for-mail From: "Steve" Newsgroups: comp.lang.ada References: Subject: Re: advantages or disadvantages of ADA over pascal or modula X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: NNTP-Posting-Host: 12.211.13.75 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc53 1041701718 12.211.13.75 (Sat, 04 Jan 2003 17:35:18 GMT) NNTP-Posting-Date: Sat, 04 Jan 2003 17:35:18 GMT Organization: AT&T Broadband Date: Sat, 04 Jan 2003 17:35:18 GMT Xref: archiver1.google.com comp.lang.ada:32533 Date: 2003-01-04T17:35:18+00:00 List-Id: "Dmitry A. Kazakov" wrote in message news:av6gr5$cgael$1@ID-77047.news.dfncis.de... > Steve wrote: > > > Ada has no equivalent to Pascal's "with" statement (if you've maintained > > a > > lot of Pascal code, you know why this is an advantage). > > In fact Ada 95 has an equivalent of Pascal's "with": > > X : Some_Type renames An.Extremely.Long.Path.Name.Object; > After maintaining both Pascal and Ada code, I wholeheartedly disagree that Ada's renaming is equivalent to Pascal's with. If you're trying to analyze Pascal code that looks something like: with a, b, c, d do begin field1 := fieldA end; Tracking down where the !@** field1 and fieldA come from is non trivial. In fact if these fields exist in more than one of the a, b, c, d records it may be compiler dependent. With Ada's renaming you can easily track a field back to its source. You may have to sift through a few renamings, but in practice this is easy to do. Side note: I worked on a Pascal to Ada translator that converted with blocks to declare blocks with renaming. A few bugs became readily apparent when the full qualification in the renaming was shown. Steve (The Duck) > -- > Regards, > Dmitry A. Kazakov > www.dmitry-kazakov.de