Path: news.daimi.aau.dk!news.uni-c.dk!sunic!sunic.sunet.se!newsfeed.tip.net!news.seinf.abb.se!nooft.abb.no!Norway.EU.net!nac.no!nntp.uio.no!NewsWatcher!user From: kolbjorn.aambo@ub.uio.no (Kolbjørn Aambø) Newsgroups: comp.lang.beta Subject: Re: Templates Date: 30 Aug 1995 07:44:17 GMT Organization: University of Oslo Library Lines: 68 Message-ID: References: NNTP-Posting-Host: ubmac86.uio.no In article , wpp@marie.physik.tu-berlin.de (Kai Petzke) wrote: : Znip great answer see preveous message! > > However, your solution (templates and overloaded operators in C++) > is not perfect either. You can use only those classes in the binary > tree, that have meaningfull relational operators defined. If you want > to order objects of classes, that don't have that operators, or if you > want to order by more than one property (say, you have a class person, > and want to have two trees, one sorted by name and one sorted by age) > you have to define your particular "wrapper" classes, that have nothing > but a pointer to the real thing and the overloaded relational operators. > > So in the end, C++ turns out to be more nifty than BETA in a few simple > cases. I can see no problem in implementing <,>, = operators for a combined unique. If you want two ways of sorting the same object I quess you need two tree? Still you will need to identify another set of attributes to sort on or do you want to reimplement the <,>,= for the orther tree, I don't undertstand your point. Anyhow as you mentions I find it rather unsatisfactory to have to dive into a rather messy libray to find out what the relational operators are called this time... And if you then even have to compare that to some constants EQ:(# exit 0 #); etc I find it quite an adventure to even decipher my own code after a few years...I must admit though that C++ have some of the same problems... > > >It's not a particularly good alternative to > >subclass a pattern "object" and overloading virtual operators GT,EQ, LT which > >are not even infix operators..... Do we have something for future implementation > >or du we have a passé minority language that are never up-to-date with the > >user-interface libraries of the different platforms? > > Flaming is easy, isn't it? > ... but then we come back to what you regard as a blunt flame, which it may be but it's motivated. I have been programming in BETA for my thesis here in Oslo and found that programming in a Language not supported by the vendor in this example Apple was such a mess because I had to take the additional cost of implementing monitor calls to do fixed point aritmetics in a way that could cooperate with the Macintosh monitor calls. This was hard enough back in 1990 that I had to give it up. I had to implement my Bezier dragging in C+- at that time. My observation is that a language is not better for the programmer than the very implementation she have to stick with. ................................................................ Universitetsbiblioteket i Oslo/Bibliografisk avd. The University of Oslo library/Bibliographic dept. N-0242 Oslo, Norway Kolbj|rn H. Aamb| University Librarian Phone: +47 22 85 91 36 Fax: +47 22 85 90 50 E-mail: kolbjorn.aambo@ub.uio.no http://www.nbo.uio.no/html/nansen/nanseneng.html http://www.nbo.uio.no/html/krigstr/krigstr.html ................................................................ There is No Way like Norway ................................................................ AMEN, ALI AKBAR, SHALOM, HIL, Carriage Return!