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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,effb80d4bb7716dd X-Google-Attributes: gid103376,public From: Brian Rogoff Subject: Re: Wanted: Ada STL. Reward: Ada's Future Date: 1999/02/05 Message-ID: #1/1 X-Deja-AN: 441094500 References: <790f4q$3l@bgtnsc01.worldnet.att.net> <36B856E4.D921C1D@bton.ac.uk> <36BAEA8B.5B375A30@bton.ac.uk> <36BB3910.B460D8B@averstar.com> Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: nntp1.ba.best.com 918242469 16681 bpr@206.184.139.136 MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-02-05T00:00:00+00:00 List-Id: On Fri, 5 Feb 1999, Tucker Taft wrote: > In my view, the C++ STL is (appropriately) following along in the > general C/C++ philosophy emphasizing writability over readability. > > An Ada 95 STL should follow Ada's emphasis of readability over > writability. Combining the notion of an iterator and a handle > into a single thing which resembles a C/C++ pointer seems very > inappropriate for Ada. If you have two separate types, one for > the iterator, and one for the handle, there is less confusion > for the reader, but probably more work for the writer. I don't follow you here. What do you mean by "handle" in that paragraph? If you write a bit of pseudocode showing handles and iterators in a collection package spec that would help. > Perhaps the C++ tendency of trying to have a single class do > everything is part of the source of the difference. In Ada, you > could have a single package with multiple types (handle, various > iterators, etc), which in the case of a collection, seems very > sensible. Because C++ and other class-oriented OOPs typically > merge the notion of types and modules, they tend to get a bit > miserly with types/classes, and try to make a single type play > several roles, which can be confusing to the reader. Yes indeed. One reason to like Ada more ;-). OTOH, Ada is a little miserly with inheritance, since it is an SI language. Something like Java interfaces or GNU C++ signatures would be very appealing, since Ada is one of the few languages with MI of implementation (via generic mixins or access discriminants) but no convenient MI of interface. None of which matters for an STL like library, which eschews inheritance. -- Brian