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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.236.86.67 with SMTP id v43mr23975017yhe.41.1398270689694; Wed, 23 Apr 2014 09:31:29 -0700 (PDT) X-Received: by 10.140.36.6 with SMTP id o6mr45124qgo.26.1398270689677; Wed, 23 Apr 2014 09:31:29 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!cm18no5679795qab.0!news-out.google.com!du2ni14151qab.0!nntp.google.com!m5no4682494qaj.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 23 Apr 2014 09:31:29 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=83.145.50.10; posting-account=3_reEwoAAAC163IAIrx427KYmwahFuh9 NNTP-Posting-Host: 83.145.50.10 References: <7f1c01c5-3563-4b94-9831-152dbbf2ecdc@googlegroups.com> <9f156351-e3d0-4d86-b816-1d5e09ee69da@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <4e3a0e68-1514-4255-9c76-ef8758991ded@googlegroups.com> Subject: Re: Your wish list for Ada 202X From: =?ISO-8859-1?Q?bj=F6rn_lundin?= Injection-Date: Wed, 23 Apr 2014 16:31:29 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:19532 Date: 2014-04-23T09:31:29-07:00 List-Id: Den onsdagen den 23:e april 2014 kl. 17:43:48 UTC+2 skrev J-P. Rosen: > Le 23/04/2014 16:32, bj=F6rn lundin a =E9crit : >=20 > >> And what is the benefit over writing: > >> > Put_Line (F_T2_Image (V2)); > > not very much. > > But the usual case is that you have to write > > Pkg_with_Long_Name.Child_pkg_With_Even_Longer_Name.F_T2_Image(V2) > > instead of V2'img >=20 > Ah! Another case of "I don't want to use the use clause, give me > something else that avoids writing these damn long names". No. using the 'use' is certainly something one can have different opinions = on. But I like to avoid these kind of errors SET_ERROR_MODE(NO_ERROR, CRANE_TYPES.ASSIGNMENT_TIMEOUT, FAL= SE); | >>> error: "NO_ERROR" is not visible >>> error: multiple use clauses cause hiding >>> error: hidden declaration at crane_types.ads:113 >>> error: hidden declaration at siemens_interface.ads:374 >>> error: hidden declaration at core_types.ads:71 One of the best thing with Ada05 was the approval of object.verb notation. Even if i get to use it seldom at work, I do in hobby projects, just for this reason. The variable/object knows where it belongs, no need to use 'use' everywhere. This is the basic idea for my 'img proposal.=20 The variable knows its type. No need to have long package names or risk hidden declarations. By the way, the above hidden situation was because of adding a constant 'NO_ERROR' in siemens_interface.ads the other two was a constant and a coded value. no hiding before that. /Bj=F6rn