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,58bffef5eda29ec,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-18 04:55:51 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!news-hub.siol.net!news.siol.net!not-for-mail From: Karel Miklav User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Clueless :) Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Tue, 18 Mar 2003 13:55:34 +0100 NNTP-Posting-Host: 193.77.153.232 X-Complaints-To: abuse@siol.net X-Trace: news.siol.net 1047992150 193.77.153.232 (Tue, 18 Mar 2003 13:55:50 MET) NNTP-Posting-Date: Tue, 18 Mar 2003 13:55:50 MET Organization: Slovenija OnLine - SiOL Xref: archiver1.google.com comp.lang.ada:35449 Date: 2003-03-18T13:55:34+01:00 List-Id: Learning Ada I'm playing with container libraries and there are some things puzzling me. If I initialize a generic container with an abstract data type, this container will copy the whole ADT through and forth on every assignment and alike. Isn't this an overkill? Then John English in his book "Ada 95: The Craft of Object-Oriented Programming" is doing this: function Succ (Iterator : Diary_Iterator) return Diary_Iterator is begin if Iterator.List = null or else Iterator.Current = null then raise Iterator_Error; else return (List => Iterator.List, Current => Iterator.Current.Next); end if; end Succ; As I understand he gets in an iterator to increase, but he throws it away and creates another one. Is it so cheap or am I missunderstanding something about Ada compilers or something? And one more question about the concept supported by keywords bounded, unbounded, dynamic, fixed-length etc. Like first I must admit I don't get it; why is there a need for this in Ada, when in tens of other languages I've seen there is not? And why there are bounded, unbounded and dynamic versions of Booch components but no polymorphic? Are people really making collections of 30 (the number is not important but the last time I made a fixed structure it was on C64 long time ago) elements like Simon Wright in his Case study? Sory folks, I'm desperate and nobody speaks Ada here :) Please tell me what am I missing. Regards, Karel Miklav