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.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ce0900b60ca3f616 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-14 10:38:49 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!psinet-eu-nl!psiuk-p4!psiuk-p3!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: List container strawman Date: Wed, 14 Nov 2001 12:59:55 -0500 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <9subes$put$1@nh.pace.co.uk> References: <3BE29AF4.80804@telepath.com> <3BF1A33D.73DE084F@boeing.com> <9su0b3$l3m$1@nh.pace.co.uk> <3BF2A186.F1911068@boeing.com> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1005760796 26589 136.170.200.133 (14 Nov 2001 17:59:56 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 14 Nov 2001 17:59:56 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:16525 Date: 2001-11-14T17:59:56+00:00 List-Id: "Jeffrey Carter" wrote in message news:3BF2A186.F1911068@boeing.com... > > Yes, but I was referring to a comment that suggested an Assign procedure > needs to be provided even though Element is private. In that case you > might as well make Element limited private since it buys you additional > applicability without changing how the component is instantiated. > I would agree that once you've gone to the effort of insisting there be an Assign and an "=" in the generic formal part, then you might just as well have made it limited private and enabled the creation of lists of just about anything. But I don't want to have to specify an Assign and an "=" every time I want to stack up some integers or something similarly simple. I just want to get the job done with as little effort or excess baggage as is possible. > Of course, the real reason not to import Element as private is that it > is an incorrect specification, and precise specification is essential to > design by contract. A generic package has 2 specifications: the generic > formal part, which should specify precisely what the client must provide > to use the package, and the package specification, which should specify > precisely what services the package provides to its clients. > Interesting, but IMHO, not compelling. Some folks may want a list package to satisfy all sorts of requirements that are of some kind of academic interest. They may even want a formal mathematical proof of correctness. I don't think any of this Moves The Mission Forward. My big questions are "Does it work reliably?" and "Is it easy to use?". Design by contract, Ravenscar profiles, Mathematical proofs, etc. may all contribute something to question #1, but if they start getting in the way of question #2, I'd find that a hindrance to producing something large numbers of people will want to use. If we insist on Design By Contract or some other approaches as requirements, I'd ask "Do all the other packages provided by the Ada standard meet these requirements?" I'd suggest that they probably don't - in which case, why should a data-structures-add-on to the language need to do so? > A formal private type specifies that the package requires "=" for type, > when in fact a list does not use "=" for its Element type. > I'd suggest that no matter how hard you try, you aren't going to get me to shed a single tear over the fact that an "=" operation came along for the ride even though a List package (according to what definition? mine is pretty loose!) doesn't need it. Every time I write a math function for a type Float, I bring in a whole slew of operations I may not need. Every time I "with" a package, the same thing happens. Every time you have a generic formal of "digits <>" or similar, you bring in operations that may not be needed. I respectfully submit the question: "So What?" :-) No matter what we do, we will *never* arrive at a "Perfect" List package. The best we can hope for is a "Good Enough" List package that covers some sufficient bulk of the possible uses and does so as easily and with as much functionality as can reasonably be had. MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/