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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f3687114209e3c2c,start X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!w35g2000yqm.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Abusing tagged types Date: Fri, 28 Nov 2008 02:01:09 -0800 (PST) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: 128.141.45.219 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1227866469 5693 127.0.0.1 (28 Nov 2008 10:01:09 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 28 Nov 2008 10:01:09 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: w35g2000yqm.googlegroups.com; posting-host=128.141.45.219; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.3) Gecko/2008092414 Firefox/3.0.3,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:3799 Date: 2008-11-28T02:01:09-08:00 List-Id: Is it considered to be a good practice to make a given type tagged only to benefit from the Object.Operation notation in Ada 2005? Let's say there is a library where there are several types. Some of them are inherently tagged due to their design and they allow Obj.Oper notation out of the box. For others there is no design motivation to make them tagged (no dispatching calls for them, no Controlled, etc.) and as a result the whole library does not "feel" consistent, since Obj.Oper is not available across all exposed types. The type can be made tagged *only* to get the syntax sugar. Is it considered to be an abuse of the language feature? -- Maciej Sobczak * www.msobczak.com * www.inspirel.com Database Access Library for Ada: www.inspirel.com/soci-ada