Newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel-eecis!gatech!news.mathworks.com!uunet!in3.uu.net!uucp4.uu.net!alexandria.organon.com!alexandria!jsa
From: jsa@alexandria (Jon S Anthony)
Subject: Re: OO, C++, and something much better!
In-Reply-To: Alan Lovejoy's message of Mon, 03 Feb 1997 16:52:43 -0800
Message-ID: <JSA.97Feb4160610@alexandria>
Sender: news@organon.com (news)
Organization: Organon Motives, Inc.
References: <JSA.97Jan16141937@alexandria> <E44u82.6uB@syd.csa.com.au>
	<mheaney-ya023280001601972303180001@news.ni.net>
	<32DF458F.4D5C@concentric.net> <32DF94DC.6FF8@watson.ibm.com>
	<32DFD972.37E4@concentric.net> <5bphq4$5js@mulga.cs.mu.OZ.AU>
	<32E05FAF.47BA@concentric.net> <5buodl$bci@boursy.news.erols.com>
	<32E2FEC7.2F7B@concentric.net> <5bvncj$gqg$1@A-abe.resnet.ucsb.edu>
	<32E47B4B.56D9@concentric.net> <32E4E6E1.437E@dstsystems.com>
	<32EE858E.FAD@concentric.net> <5cobea$cm8@news1.ucsd.edu>
	<32F07705.289C@concentric.net> <JSA.97Jan30205754@alexandria>
	<32F3A1E4.2F6@concentric.net> <JSA.97Feb3175743@alexandria>
	<32F6885B.978@concentric.net>
Date: Tue, 4 Feb 1997 21:06:10 GMT
Lines: 35
Xref: glinda.oz.cs.cmu.edu comp.lang.c++:245557 comp.lang.smalltalk:50931 comp.lang.eiffel:18189 comp.lang.ada:57165 comp.object:60822

In article <32F6885B.978@concentric.net> Alan Lovejoy <alovejoy@concentric.net> writes:

> > Well, as I pointed out (up there) depending on what it is you really
> > _want_ there are various ways of doing this.  Ones which would in fact
> > allow the "D1 := D2" assignment.  But they start to become _very_ odd
> > - as in you begin to lose pretty much most of the statically checkable
> > aspects and just keep pushing more and more off to runtime checks.
> > The problem is, there is no good reason that I can see for _why_ you
> > would _want_ to do this sort of thing.
>
> Because you want to choose the optimal data structure/implementation
> at runtime based on the size and characteristics of the data?

You can do that easily with the example I gave without change and with
no need for "D1 := D2" capabilities.  So, this reason is irrelevant.


> Because you want to write generic functions and utilities that can
> be applied to any object that conforms to a Dictionary-like
> interface?

You can do this too - that's what generics are for.  Just define the
Dictionary bit as a generic which requires some minimal set of
operations for its formal parameter which the dictionary can use to
implement its interface.  Cake.  This one too is irrelevant.

/Jon

-- 
Jon Anthony
Organon Motives, Inc.
Belmont, MA 02178
617.484.3383
jsa@organon.com

