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,927ae253da8bb547 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-01 08:33:49 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Specialization Date: 01 Jun 2002 11:25:04 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: <4519e058.0205300909.5bfb317d@posting.google.com> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1022945550 4131 128.183.220.71 (1 Jun 2002 15:32:30 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 1 Jun 2002 15:32:30 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:25151 Date: 2002-06-01T15:32:30+00:00 List-Id: Simon Wright writes: > dennison@telepath.com (Ted Dennison) writes: > > > Why wouldn't that happen automaticly? If you want to *manually* > > control finalization, you probably shouldn't be using controlled > > types. > > I _knew_ there was a problem in the Booch Containers around here > ... if you use a bounded container it places the elements in an array, > so if they need finalization it may well happen long after you were > expecting it to. I guess I'd need to add something to the generic .. > > generic > type Item is private; > with function "=" (L, R : Item) return Boolean is <>; > Null_Value : Item; -- new > package BC.Containers is > > which means yet another non-defaultable generic parameter, Things should be as simple as possible, but no simpler. Put it in. You could actually give it a default, but the users would have to make that object visible, and use your name for it; not much better than simply supplying the parameter at instantiation. > people are fed up enough with instantiating all these nested > generics as it is. BCs are for experts. Tell them to suck it up :). > I suppose this could be deferred to the forms that need it, clearly > Unbounded doesn't: Yes, localize the dependencies as much as possible. -- -- Stephe