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,48fa8e3cfaec41af X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-23 12:32:14 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Perhaps we keep lists elements private and adjust the elements to fit? Date: 23 Jul 2002 15:23:04 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1027452712 11499 128.183.220.71 (23 Jul 2002 19:31:52 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 23 Jul 2002 19:31:52 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:27342 Date: 2002-07-23T19:31:52+00:00 List-Id: "Chad R. Meiners" writes: > "Stephen Leake" wrote in message > news:uheirlk4z.fsf@gsfc.nasa.gov... > > My own opinion is that supporting limited types is a requirement for > > any general-purpose container. > > Perhaps what we need to do is write the container libraries to accept > private types and provide a generic package that converts limited privates > to private types. Let's assume that we have a limited type as follows > "Promoting" a limited type to a private type by adding a generic "copy" operation is certainly one way to go. In SAL, I allowed for "true" limited types, where copy makes no sense in any situation. The container packages require a "Copy" operation, but for "true" limited types, the user simply provide a "copy" that raises an exception. Also in SAL, I have helper packages that define the obvious "copy" operation for a non-limited type. I guess we could have a couple versions of the generic "promote" package; one that does a simple copy, one that raises an exception. Users could write others that do deep copy, etc. That might be better than what I have in SAL now. -- -- Stephe