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,LOTS_OF_MONEY autolearn=ham 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-08 02:41:09 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news.huji.ac.il!not-for-mail From: "Ehud Lamm" Newsgroups: comp.lang.ada Subject: Re: List container strawman Date: Thu, 8 Nov 2001 12:34:21 +0200 Organization: The Hebrew University of Jerusalem Message-ID: <9sdnb2$dd4$1@news.huji.ac.il> References: <9rti6v$hcu$1@news.huji.ac.il> NNTP-Posting-Host: di3-58.dialin.huji.ac.il X-Trace: news.huji.ac.il 1005215907 13732 132.64.13.58 (8 Nov 2001 10:38:27 GMT) X-Complaints-To: abuse@news.huji.ac.il NNTP-Posting-Date: Thu, 8 Nov 2001 10:38:27 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2014.211 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 Xref: archiver1.google.com comp.lang.ada:16042 Date: 2001-11-08T12:34:21+02:00 List-Id: Ted Dennison wrote in message news:WOzE7.10186$xS6.14012@www.newsranger.com... > In article <9rti6v$hcu$1@news.huji.ac.il>, Ehud Lamm says... > >2. Why is List private? Shouldn't it be limited private, so we avoid > >possible erros caused by aliasing? > > Ahh. It finally dawned on me what your objection to private was. (I'm a little > slow today again.) We are talking about what happens when you do a > "List1 := List2;", aren't we? Yep. And to make things worse the scoping issues with Controlled are really confusing for beginners. Now I don't see any reason why newcomers shouldn't be able to reuse standard containers, but I really don't want to start explaining "controled type must be declared at library level". Amusingly, a student just asked about this problem, in my course newsgroup, trying to reuse a linked list package. They are now just learning about the basics of ADTs, and Ada packages... Are we coming to the conclusion that Ada95 approaches to memory management (Controlled and storage pools), simply aren't enough for creating reliable components, without imposing inessential restrictions? We want user created abstractions to be as much like language supplied types as possible, remember. Ehud