Newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object,comp.software-eng
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!cam-news-feed3.bbnplanet.com!cam-news-hub1.bbnplanet.com!news.bbnplanet.com!news.maxwell.syr.edu!news.mathworks.com!arclight.uoregon.edu!hammer.uoregon.edu!zephyr.texoma.net!uunet!in1.uu.net!uucp4.uu.net!alexandria.organon.com!alexandria!jsa
From: jsa@alexandria (Jon S Anthony)
Subject: Re: What is wrong with OO ?
In-Reply-To: Bart Samwel's message of Fri, 14 Feb 1997 18:10:21 +0100
Message-ID: <JSA.97Feb16140710@alexandria>
Sender: news@organon.com (news)
Organization: Organon Motives, Inc.
References: <5dopri$dei@news4.digex.net> <JSA.97Feb11200125@alexandria>
	<3301D875.188B@mmm.com> <33049C7C.41C6@wi.leidenuniv.nl>
Date: Sun, 16 Feb 1997 19:07:10 GMT
Lines: 26
Xref: glinda.oz.cs.cmu.edu comp.lang.c++:248245 comp.lang.smalltalk:51717 comp.lang.eiffel:18474 comp.lang.ada:57663 comp.object:61225 comp.software-eng:53849

In article <33049C7C.41C6@wi.leidenuniv.nl> Bart Samwel <bsamwel@wi.leidenuniv.nl> writes:

[various points about why C++ "virtual" tagging is "upside down"]

> by renaming one of the functions. When you make it the default that
> overridden functions are dynamically bound ('virtual') and that
> non-overridden functions are statically bound, you don't have to
> bother the programmer with 'virtual' keywords at all - in this
> situation, the keyword becomes obsolete.

You can do better than this.  Let the choice between static binding to
the specific type vs dynamic binding to the runtime type be determined
by the user (client) at the point of invocation.  This makes runtime
polymorphism a local thing instead of a global thing.  Which helps in
future maintenance and is somewhat more flexible.  In particular, the
class designer does not have to worry about making the "wrong choice"
up front.

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

