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,8eff44ec1bcf8433 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-24 12:09:09 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: Container reqs Date: 24 Oct 2001 15:01:04 -0400 Organization: NASA Goddard Space Flight Center Message-ID: References: <9qctpn$lil$1@news.huji.ac.il> <3nCy7.29644$ev2.35903@www.newsranger.com> <9qfgla$7sb$3@news.huji.ac.il> <9qnflg$pm$1@news.huji.ac.il> <3BCF57C8.DE99D9C@boeing.com> <3BD0E523.E23FB134@acm.org> <3BD4D157.C96BBAAD@acm.org> <%geB7.39480$ev2.46195@www.newsranger.com> <3BD626BF.4CAEAF69@acm.org> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1003950172 3622 128.183.220.71 (24 Oct 2001 19:02:52 GMT) X-Complaints-To: dscoggin@cne-odin.gsfc.nasa.gov NNTP-Posting-Date: 24 Oct 2001 19:02:52 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Xref: archiver1.google.com comp.lang.ada:15146 Date: 2001-10-24T19:02:52+00:00 List-Id: Ted Dennison writes: > In article <3BD626BF.4CAEAF69@acm.org>, Jeffrey Carter says... > > > >Ted Dennison wrote: > >> > >> It probably wouldn't prove too much of a hardship in Ada to limit the > >> component library to non-limited definite types. > > > >Most of the data structures in the PragmAda Reusable Components can > >handle any type the client can define an Assign procedure for. That > >includes many useful limited types, such as most of the data structures. > > True. But when you take that approach you have to do one of two things: > > 1) Force *every* user, including the >90% using only non-limited definite types, > to create an "assign" procedure so that they can instantiate the container > package. One of my personal no-no's of design is forcing extra work of this > magnitude on every user to support an exceptional case. > > 2) Create separate versions of the same component for use with > limited/indefinite types. Correct. Although another option, that I mention without really supporting, is to use gnatprep to provide the two packages above, from a single source. That eases the maintenance burden. But it won't be standard Ada. > I see that you chose 1, and tried to mitigate the effort with > another helper generic. But again, all this is complicating things > significantly for the benifit of a small percentage of users. How do you know it is a "small" percentage? > Is there anyone out there who really thinks that being able to > handle such types is a requirement, given that you can still handle > pointers to them, and doing so would complicate the facility for > everyone? The packages in SAL were built precisely because I needed them in one or another project I was working on. I don't know how many others would use the full feature set, but I will in future projects. I use limited indefinite types a lot! Maybe this weekend I'll find time to sift thru my project code for some real examples. -- -- Stephe