Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!usc!brutus.cs.uiuc.edu!psuvax1!rutgers!cmcl2!esquire!yost From: yost@esquire.UUCP (David A. Yost) Newsgroups: comp.object Subject: Re: Understanding the Object-Oriented Life-Cycle Message-ID: <1567@esquire.UUCP> Date: 13 Nov 89 21:49:21 GMT References: <5026@internal.Apple.COM> <315@shrike.AUSTIN.LOCKHEED.COM> Reply-To: yost@esquire.UUCP (David A. Yost) Organization: DP&W, New York, NY Lines: 31 In article <315@shrike.AUSTIN.LOCKHEED.COM> aihaug@AUSTIN.LOCKHEED.COM (Daniel A Haug) writes: >In article <5026@internal.Apple.COM>, chewy@apple.com (Paul Snively) writes: > >> Speaking of criticisms, I'm interested in a good discussion on why >> statically-typed hybrid languages like Object Pascal and C++ aren't useful >> in some contexts where dynamically-typed languages such as Common Lisp >> w/CLOS are. Any takers? > >By far (IMHO), the largest advantage to this is in code extensibility, >or reusability. ... For example, I need only implement a priority queue >ADT once. The algorithm is the >same, but the types can be whatever. Of course, someone has to say (I'll volunteer) that the following language attributes are in principle orthogonal: 1. statically-typed 2. hybrid languages like Object Pascal and C++ 3. genericity (also known as parameterized types) You are asking for #3. C++ has 1 (with escape mechanisms), 2, and a kluged 3-workaround with promises of real 3 'real soon now' (my guess 1992). There do exist languages that have 1 and 3. Eiffel for one, and it goes so far as to provide for generic class parameters to be constrained to be descendants of a specific type, which you need for static type checking. For example, HASH_TABLE [ T -> HASHABLE ] SORTED_LIST [ T -> COMPARABLE ] etc. --dave yost