🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #3140

Re: CHALLENGE: heterogeneous collections

#3140
From: urs hoelzle
Date: Wed, 27 Mar 1991 17:22
24 lines
2122 bytes
> As someone who hasn't yet completely converted to the object oriented religion,
> this has always struck me as using the wrong tool for the job.  I really don't
> want a "list of T or subtype of T".  I want a "list of objects that understand
> foo".  Once I take that view, I have no problems, at least in the few
> statically typed languages that allow this (e.g. Russell, and probably FX from
> MIT, and probably Scratchpad II from IBM).  I also don't need to construct
> my types in such a way that all types that understand foo are "derived" from
> a common supertype;  I can use inheritance purely where it simplifies the
> implementation.  And I get full static checking, though elements of the list
> will, of course, somehow carry the "foo" function with them.  (In Russell, I
> would build a list of pairs <x: T, T: [algebra containing foo]>.)


This sounds good.  However, I suspect that these languages don't (didn't?)
have inheritance at all...?  Plus, some people don't like functional languages.
Could you post some pointers to the relevant literature?

Thanks,

-Urs

------------------------------------------------------------------------------
Urs Hoelzle                 			       hoelzle@cs.stanford.EDU
Center for Integrated Systems, CIS 42, Stanford University, Stanford, CA 94305
Technical Details
Message-ID: <1991Mar27.172227.25374@leland.Stanford.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uwm.edu!bionet!agate!stanford.edu!leland.Stanford.EDU!leland.Stanford.EDU!hoelzle
References: <22032@yunexus.YorkU.CA> <11820:Mar1923:59:3591@kramden.acf.nyu.edu> <19MAR91.22493670@uc780.umd.edu> <18271:Mar2013:19:1091@kramden.acf.nyu.edu> <1991Mar20.214231.3411@neon.Stanford.EDU> <jls.669591628@rutabaga> <1991Mar22.210725.29448@neon.Stanford.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uwm.edu!bionet!agate!stanford.edu!leland.Stanford.EDU!leland.Stanford.EDU!hoelzle
From: hoelzle@leland.Stanford.EDU (urs hoelzle)
Newsgroups: comp.lang.misc,comp.object,comp.lang.eiffel
Subject: Re: CHALLENGE: heterogeneous collections
Message-ID: <1991Mar27.172227.25374@leland.Stanford.EDU>
Date: 27 Mar 91 17:22:27 GMT
References: <22032@yunexus.YorkU.CA> <11820:Mar1923:59:3591@kramden.acf.nyu.edu> <19MAR91.22493670@uc780.umd.edu> <18271:Mar2013:19:1091@kramden.acf.nyu.edu> <1991Mar20.214231.3411@neon.Stanford.EDU> <jls.669591628@rutabaga> <1991Mar22.210725.29448@neon.Stanford.EDU>
Sender: news@leland.Stanford.EDU (Mr News)
Organization: AIR, Stanford University
Lines: 24