Xref: utzoo comp.lang.modula2:2948 comp.edu:3463 Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!rutgers!usc!samsung!munnari.oz.au!bunyip!uqvax.decnet.uq.oz!wattle!cszthomas From: cszthomas@qut.edu.au Newsgroups: comp.lang.modula2,comp.edu Subject: Re: Implementing Abstract Lists Message-ID: <13227.26b9800a@qut.edu.au> Date: 3 Aug 90 13:45:46 GMT References: <290@saxony.pa.reuter.COM> <8974@ubc-cs.UUCP> Organization: Queensland University of Technology Lines: 43 In article <8974@ubc-cs.UUCP>, manis@cs.ubc.ca (Vincent Manis) writes: > Sorry, Modula-2 isn't really suitable for generic "container" ADT's such > as List, Stack, Queue, etc. (i.e., all the stuff of computer science). > There is a way to do it, namely by using ADDRESS values, and casting the > actual parameters to type ADDRESS in calls to the ADT procedures, but > it's a crock. Agreed. In the early days of Modula-2 two of us tried setting up generics in M2 and gave up because of poor language support. > Wirth has abandoned Modula. His new language, Oberon, provides garbage > collection, and allows a limited form of structure inheritance. The > result is that you can have a List module. You can then declare an > IntegerList record type, inheriting from List. (Note that Oberon isn't > object-oriented: inheritance affects fields, not methods.) The List > procedures will work with IntegerLists with no problem. As a note, ETH has also developed an Object Oberon as well. > I switched from Modula-2 to C in my data structures course last year. > Afterwards, I really felt that I had lost almost nothing. This isn't a > compliment to C, but a criticism of Modula. It really doesn't help you > very much with the tough problems. I am curious has to how you justify this paragraph? Granted M2 doesn't support generics, but neither does C. Then there are all of the facilities in M2 that C doesn't have. > -- > \ Vincent Manis "There is no law that vulgarity and > \ Department of Computer Science literary excellence cannot coexist." > /\ University of British Columbia -- A. Trevor Hodge > / \ Vancouver, BC, Canada V6T 1W5 (604) 228-2394 If I was in a nasty mood I would say: "Ah, UBC, that explains your ideas, and that also explains why I never went to UBC." Au revoir, @~~Richard Thomas aka. The AppleByter -- The Misplaced Canadian~~~~~~~~~~~@ { InterNet: R_Thomas@qut.edu.au ACSNet: richard@earth.qitcs.oz.au } { PSI: PSI%505272223015::R_Thomas } @~~~~~School of Computing Science - Queensland University of Technology~~~~~~@