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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 Path: border1.nntp.dca.giganews.com!nntp.giganews.com!goblin2!goblin.stu.neva.ru!reality.xs3.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Your wish list for Ada 202X Date: Wed, 23 Apr 2014 15:03:26 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <7f1c01c5-3563-4b94-9831-152dbbf2ecdc@googlegroups.com> <9f156351-e3d0-4d86-b816-1d5e09ee69da@googlegroups.com> <4e3a0e68-1514-4255-9c76-ef8758991ded@googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1398283409 30736 69.95.181.76 (23 Apr 2014 20:03:29 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 23 Apr 2014 20:03:29 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: number.nntp.dca.giganews.com comp.lang.ada:186043 Date: 2014-04-23T15:03:26-05:00 List-Id: "björn lundin" wrote in message news:4e3a0e68-1514-4255-9c76-ef8758991ded@googlegroups.com... ... >> 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, > FALSE); > | > >>> 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 This is precisely why I consider package use a significant maintenance hazard. That hazard could have been reduced by allowing more things (especially objects) to be overloadable, but it cannot be eliminated (with introducing Beaujolias or other nasty effects). >One of the best thing with Ada05 was the approval of object.verb notation. Ada 2012 adds "use all type" with essentially the same semantics as object.verb notation. If you have untagged types, especially enumerations, I strongly suggest using that. (Since it only makes overloadable entities visible, it doesn't have the maintenance hazard unless the profiles match -- in which case you have a design problem.) Randy.