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-Thread: a07f3367d7,4cad17e8664256c9 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!feeder.erje.net!news2.arglkargh.de!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Allocation questions Date: Thu, 28 May 2009 12:58:11 -0500 Organization: Jacob Sparre Andersen Message-ID: References: <4a1e5d9e$0$2868$ba620e4c@news.skynet.be> <106ssailgl19b$.1sngvazrm7u5w.dlg@40tude.net> <40a2a911-6b92-407e-b1e3-deabf154892f@x6g2000vbg.googlegroups.com> <4a1e8454$0$2861$ba620e4c@news.skynet.be> <78f30732-8d8d-4009-b9ed-ba19d275a5d9@f16g2000vbf.googlegroups.com> <336b285f-2245-4ede-8528-841a2c713e80@b7g2000pre.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1243533514 19547 69.95.181.76 (28 May 2009 17:58:34 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 28 May 2009 17:58:34 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Xref: g2news2.google.com comp.lang.ada:6081 Date: 2009-05-28T12:58:11-05:00 List-Id: >"Adam Beneschan" wrote in message >news:336b285f-2245-4ede-8528-841a2c713e80@b7g2000pre.googlegroups.com... >On May 28, 6:39 am, Martin wrote: >> > 2 more questions: >> >> > 1) In fact (due to my background!), I would like to use the dot >> > notation: >> > object.method. >> > So I have add "tagged": > >I'm not sure I'd recommend declaring a type "tagged" JUST to get the >dot notation. There's a small amount of overhead involved with making >a type tagged; but more importantly, a fair number of language rules >are different for tagged types than for untagged types. (You ran into >one different rule below; another one that comes to mind immediately >is that there are differences in the semantics of "=". There are >others. You might not run into any of them, though.) That's strange advice, given that the mantra of the Ada 95 team was that "tagged types work right". Yes, there are minor differences in semantics, but in all cases that I know of, tagged types work more logically than untagged types (mainly because of compatibility issues). I'd be more likely to reverse the advice and suggest that you declare all of your records tagged. (Well, I'd go further and suggest that pretty much everything ought to be declared controlled, which of course subsumes tagged, but that isn't as clear cut.) I can understand a concern about the overhead of a tag, but that only matters if there are going to be many of these objects and the objects are relatively small (given that tags are fairly small). Neither of those seems to be true in this case. Randy.