HDTenEightyP/NetNews huggingface dataset:
From: stt@spock.camb.inmet.com (Tucker Taft)
Newsgroups: comp.object
Subject: The definition of polymorphism
Date: 26 Jan 93 22:38:26 GMT
Distribution: comp.object
Organization: Intermetrics Inc, Cambridge MA


In debating the meaning of polymorphism, it
seems important to distinguish between where a
*program* is polymorphic in some way, and where some *run-time*
entity (like an object) is polymophic.

In many object-oriented systems, no object can change its
underlying type/class at run time.  However, if you
look at a program that manipulates objects, you find
that a given name is used to reference (over different
executions of the same piece of program text) objects
of different underlying types/classes.

For a "conventional" strongly typed language like Ada 83, this kind
of "polymorphism" doesn't happen, except inside some kind of
explicit "template" or "generic."  This is compile-time parametric 
polymorphism.

When you go from a conventional strongly typed language
to an object-oriented strongly typed language (such as Ada 9X
or Eiffel), you now find a single name within a given
piece of program text refers to objects of different types/classes
on different executions.  

However, because it is "strongly typed," we 
do know *something* about the set of types for the objects
that a given name might reference.  This might be called the
"compile-time" type for the *name* (not the object), or the 
"formal class" (or the "reference type" or ... -- standardization
of terminology would help someday ;-).   

This "formal class" determines which operations
are permitted (at compile-time) on the *name*, and generally 
(at least in most simple type systems!) represents a lower bound on the
set of operations defined for any *object* that might be referenced
by the name at run-time.  This is run-time/dynamic (inclusion) 
polymorphism.  (There is also run-time parametric polymorphism, though
not as frequently in compiled languages.)

Now, back to a tentative definition of polymorphism:

   Polymorphism is where a given occurrence of a name within a given
   piece of program text can refer to objects of different
   types at run-time.  This polymorphism could be either
   compile-time or run-time, and either parametric or inclusion.  

If the polymorphism is strongly typed, then the occurrence of the
name has various compile-time attributes that represent a lower 
bound on the properties of any possible object that will be referenced
at run-time.  

(Note that the compile-time polymorphism inherent
 in C++ templates is not strongly typed (until instantiation time), 
 whereas the run-time polymorphism inherent in C++ class pointers 
 and references is strongly typed.  In Eiffel and Ada 9X, both the 
 compile-time and run-time polymorphism is strongly typed.)

(In addition to the above, there is "ad hoc" polymorphism
 otherwise known as overloading, where two different occurrences of
 the same name nevertheless resolve to be references
 to different entities at *compile-time*, but that's not
 usually of great interest when people discuss polymorphism.)

S. Tucker Taft   stt@inmet.com
Intermetrics, Inc.
Cambridge, MA  02138
From: hall@dec254.uucp (Phil Hall)
Subject:  Re: FAQ  Part 1 (of 2) [ polymorphism or latent typing? ]
Organization: Cincinnati-Milacron, Inc.
Date: Fri, 22 Jan 93 19:46:36 GMT


In <PCG.93Jan20002119@decb.aber.ac.uk> pcg@aber.ac.uk (Piercarlo Grandi)
expounds:

pcg> I would find it rather hard to agree with those who say that latent
pcg> typing of variables is an essential aspect of an OO language, as IMNHO
pcg> one can still apply the OO paradigm without it.

Well, I guess I'll throw my 2 cents in here.

Without "latent typing" there really is very little to distinguish
object-orientedness.  You might say inheritance is a distinguishing 
factor, but this without late binding is not much more than macro 
substitution.

I would argue that languages without late binding are better refered 
to as modular languages; OO is a more restricted paradigm.

Also, on the topic of polymorphism and function dispatching.  I agree 
that polymorphism is better viewed with respect to functions.  This 
view gives a good perspective of the difference between multi-method 
and object-oriented languages.  I couldn't help it, yet another 
opinion %-). 

The trouble with calling languages with multi-methods object-oriented is
that they are objects(plural)-oriented.  Without a distinguished object 
as the receiver of a message I don't see any point in trying to define 
what OO is.  Your back into the broader scope better known as modularity. 

Why is it that anybody's paradigm which is modular deserves the title of
object-oriented?  Just because we restrict our definition of OO to 
something less then optimal(oooh, heresy :-), it does not mean it is 
not a more proper definition.

I guess OO can be defined as: 

      My superior method for clustering functions and data.

Phil
-------------
Philip W. Hall                    Internet:  ...UUCP!dec254!hall
Cincinnati Milacron, Dept. 67G               hallpwcd@ucunix.san.uc.edu
Advanced Manufacturing Systems Division
4701 Marburg Avenue, Cincinnati, Ohio  45209    
Xref: sparky comp.object:5036 comp.lang.c++:19838 comp.lang.c:20151
From: pcg@aber.ac.uk (Piercarlo Grandi)
Newsgroups: comp.object,comp.lang.c++,comp.lang.c
Subject: Re: Runtime access to Symbol tables
Date: 24 Jan 93 19:58:11 GMT
Reply-To: pcg@aber.ac.uk (Piercarlo Grandi)
Organization: Prifysgol Cymru, Aberystwyth

>>> On 19 Jan 93 21:49:50 GMT, bar@advtech.uswest.com (Bala Ramakrishnan) said:

Ramakrishnan> I would like to know if it is possible/easy to access the
Ramakrishnan> symbol tables from the executable (a.out) for the above
Ramakrishnan> purpose, assuming that the corresponding .o files have
Ramakrishnan> been compiled with the '-g' option.

Ah yes, of course. GDB does it fairly well. So probably your best route
is to read the GDB code and do something similar. I would guess that on
most machines you have to load in the *whole* of the symbol table to do
anything useful; most symbol table formats are such that it is not easy
to scan its sequential form to find only what you need.

I think the best interface for such a function would take s tring for
the type of the entity to print, and a pointer to the entity itself:

	class Square { .... }; Square a_square(....);
	cout << symbolically("Square",&a_square) << '\n';

It would also be possible, if you want to print a named entity, to look
up the type of the named entity in the symbol table, but I think that in
practice this is extra overhead and most probably most of the time you
would would to print symbolically the contents of an unnamed entity.

But this gets into trouble, as you would seem to need a general term
parser withing your function, as evident by your example:

Ramakrishnan> 	LogTheObject("Bar::DoSomething()", "*f");

This could become:

	symbolically("proc_name","a_term")

where "a_term" looks quite hard to tackle (GDB more or less doe sit, and
it's not simple). Consider the alternatives:

	symbolically("TreeKeyValue",root->left->right->tag.value)
	symbolically("AClass::ThisProc","root->left->right->tag.value");

I think the first laternative is much easier to implement and provides
the same value.
--
Piercarlo Grandi <pcg@aber.ac.uk> c/o Dept of CS
University of Wales, Penglais, Aberystwyth SY23 3BZ, UK
From: pcg@aber.ac.uk (Piercarlo Grandi)
Newsgroups: comp.object
Subject: Re: FAQ  Part 1 (of 2) [ a bit of polemic ]
Date: 25 Jan 93 21:50:42 GMT
	<PCG.93Jan19231409@decb.aber.ac.uk> <1993Jan21.024452.6
	<KERS.93Jan21100655@cdollin.hpl.hp.com>
Reply-To: pcg@aber.ac.uk (Piercarlo Grandi)
Organization: Prifysgol Cymru, Aberystwyth

>>> On 21 Jan 93 10:06:55 GMT, kers@hplb.hpl.hp.com (Chris Dollin) said:

Dollin> In article ... kers@hplb.hpl.hp.com (Chris Dollin) writes:

Dollin>   A method is *parametrically polymorphic* in an argument A if
Dollin>   it is independant of the type of A and so can be applied with
Dollin>   values of any type in the A argument.

Dollin> In Eiffel, this is genericity; in C++, it can be obtained using
Dollin> template functions (the argument A must then be one of the
Dollin> template argument types).  Dynamically typed (or, using
Dollin> Piercarlo's term, latently typed) languages usually have this as
Dollin> an automatic property.

A side note: latent typing is not my own definition; it is popular in
other non OO contexts. 'Latent' is used as the actual type of the values
denoted by a pointer/variable/whatever is latent, i.e.  revealed only at
runtime.

I find 'latent' better than 'dynamic'; the latter suggests the erroneous
idea that somehow the type/mode/class of a value can change dynamically
(thus probably Hathaway's bizarre notion that polymorphism is based on
'formal objects' that can change shape 'dynamically'), while instead the
type/mode/class in just _unknown_ until runtime, not 'dynamic' (a term
that I would reserve for the Self case, where the type/mode/class of an
object can actually change 'dynamically').

Dollin> I don't know if it's easy to unify the two kinds of polymorphism
Dollin> in a single framework. Even if so, it might be useful to
Dollin> distinguish them.

Well, inclusion and parametric ("true") polymoprhism are just two points
on a spectrum, like this:

monomorphism:
#1	can denote values of one type/mode/class

polymorphism:
#2	can denote values of any type/mode/class derived from ...
#3	can denote values of any type/mode/class among ...
#4	can denote values of any type/mode/class

As far as I know case #3 has no name (where the restriction is not to a
subtree of the derivation hierarchy, but to an arbitrary set of the
types/modes/classes), and I cannot say to have ever found it in any
language, OO or otherwise.
--
Piercarlo Grandi <pcg@aber.ac.uk> c/o Dept of CS
University of Wales, Penglais, Aberystwyth SY23 3BZ, UK
Newsgroups: comp.object,comp.software-eng
From: tne@world.std.com (Thomas N Erickson)
Subject: Re: Writing Windows Applications in Ada?
Organization: The World Public Access UNIX, Brookline, MA
Date: Thu, 21 Jan 1993 14:40:34 GMT

mmaccorm@fox.nstn.ns.ca (Mike Mac Cormack) writes:

>I am looking for information on programming windows applications using Ada.  
>Do Verdix and Telesoft offer validated compilers for Windows?  If they do 

Unfortunately, it is not possible to validate an Ada compiler under
Windows 3.1.  However, we at Alsys (including the former Telesoft) have a
validated DOS compiler which works within a DOS window under Windows 3.1. 
We have plans to produce a validated Windows NT compiler in addition to
our OS/2 2.0 compiler that will be released shortly.

>not, does anyone?  Are there CASE tools compatible with these compilers?  


There are a variety of CASE tools that we interface with, and if there are
particular tools you have an interest in, let us know.
 
Please contact Brett Van Gelder (617)270-0030 for more information.


-- 
Tom Erickson
Alsys
tne@world.std.com
From: kers@hplb.hpl.hp.com (Chris Dollin)
Date: Fri, 22 Jan 1993 10:11:55 GMT
Subject: Re: Re: FAQ  Part 1 (of 2) [ polymorphism or latent typing? ]
Organization: Hewlett-Packard Laboratories, Bristol, UK.
Newsgroups: comp.object

In article ...Bob Hathaway <objsys@netcom.com> writes:

   Since Strachey defined parametrically polymorphic
   functions (functions parameterized by objects of different types), the
   formal parameters assume many forms and can be referred to as polymorphic.

Yes; and formal parameters are not objects. (Digression to meta-discussion
about how the compiler might treat the code would be irrelevant.)

   Most static OO languages equate polymorphism with dynamic
   binding.  For instance in the C++ ARM (p209): "... the ability to call
   a variety of functions using exactly the same interface - as is provided
   by virtual functions - is sometimes called polymorphism."

Yes; that's *inclusion polymorphism*, where a parameter of type *T can be a
pointer to a T' which is a subtype of T. ``Dynamic binding'' (a term which has
changed its meaning over the past few years, I note) is a way of implementing
inclusion polymorphism.

In this third-level text

   >objsys> In a nutshell, polymorphism is the ability of an object to be a
   >objsys> placeholder (or formal object) for many different objects, and
   >objsys> for that formal object to behave differently based on the actual
   >objsys> object present.

I suspect you are confusing the notion of *object* (the things a program talks
about and manipulates) with that of *variable* (the ways through which it gets
at the objects). When you then say:

   Most modern languages (I already gave references)
   use polymorphism to refer to the ability of an object to assume (or be
   assigned to) many different forms of objects (Meyer is quite clear on this),

where Meyer seems (to me) to be quite clear that it is *entities* that do the
referring, not objects, my suspicion grows stronger.

   True, but the classical OO definition of polymorphism, or what Booch
   simply defines as polymorphism [Booch 91, p517] is:  "A concept in type
   theory, according to which a name (such as a variable declaration) may
   denote objects of many different classes that are related by some common
   superclass; thus, any object denoted by this name is able to respond to
   some common set of operations in different ways."

And in this definition, it is the *name* which may denote objects of many
different (related) classes. So when you say:

   I think you're the one inflicting confusing terminology.  Everyone in recent
   history seems to define polymorphism as a property of objects (Stroustrup,
   Meyer, Booch, ...) 

I think this is because you have conflated the notions of ``objects'' and
``variable'' (or reference, or pointer, or whatever).
--

Regards,    | "You're better off  not dreaming of  the things to come;
Kers.       | Dreams  are always ending  far too soon." - Caravan.
Newsgroups: comp.object
From: Bob Hathaway <objsys@netcom.com>
Subject: Re: FAQ  Part 1 (of 2) [ a bit of polemic ]
Organization: Object Systems
Date: Sat, 23 Jan 1993 06:50:25 GMT

In article <KERS.93Jan21100655@cdollin.hpl.hp.com>, kers@hplb.hpl.hp.com (Chris Dollin) writes:
>  A method is *parametrically polymorphic* in an argument A if it is
>  independant of the type of A and so can be applied with values of
>  any type in the A argument.
>
>In Eiffel, this is genericity; in C++, it can be obtained using template
>functions (the argument A must then be one of the template argument types).
>Dynamically typed (or, using Piercarlo's term, latently typed) languages
>usually have this as an automatic property.
>
>I don't know if it's easy to unify the two kinds of polymorphism in a
>single framework. Even if so, it might be useful to distinguish them.

With a type parameter (whether implicit or explicit) you get checking,
without it you don't; period.  The term "generic" has been used to refer
to the static case.

bob
objsys@netcom.com

P.S.  Any other questions?
From: kers@hplb.hpl.hp.com (Chris Dollin)
Date: Mon, 25 Jan 1993 11:22:53 GMT
Subject: Re: Re: FAQ  Part 1 (of 2) [ polymorphism or latent typing? ]
Organization: Hewlett-Packard Laboratories, Bristol, UK.
From: dgeary@sierra.com (David Geary)
Newsgroups: comp.object
Subject: Re: Rethinking the Object Paradigm
Date: 25 Jan 93 20:52:33 GMT
Organization: Sierra Geophysics,  Kirkland WA

In article <PCG.93Jan15171138@decb.aber.ac.uk> pcg@aber.ac.uk (Piercarlo Grandi) writes:

>The fundamentals of actor and closure based OO programming (and the
>differences thereof) are explained exemplarly well in the classic
>programming primer "Structure and interpretation of computer programs",
>MIT press.
>--
>Piercarlo Grandi, Dept of CS, PC/UW@Aberystwyth <pcg@aber.ac.uk>
>  E l'italiano cantava, cantava. E le sue disperate invocazioni giunsero
>  alle orecchie del suo divino protettore, il dio della barzelletta

  Anyone have names of author(s) or ISBN?

-- 
David Geary           	|   Seattle - America's most attractive city ... 
Sierra Geophysics	|	
dgeary@sierra.com	|   to the jetstream ;-(
Newsgroups: comp.object
From: egzondag@prl.philips.nl (Eddy Zondag)
Subject: Wanted: references to literature on mixins.
Organization: Philips Research Laboratories, Eindhoven, The Netherlands
Date: Mon, 25 Jan 1993 13:41:28 GMT

Hi folks,

The title says it all.

Thanx & Greet'ns

Eddy Zondag
Philips Research
egzondag@prl.philips.nl
"to boldly go where no bald has gone before..."

Newsgroups: comp.object
From: dlewis@fnma.com
Subject: Re: Software design tool?
Reply-To: dlewis@fnma.com
Organization: Fannie Mae
Distribution: na
Date: Wed, 27 Jan 1993 15:47:03 GMT

In article <1993Jan19.155053.835@oakhill.sps.mot.com>  
ponder@oakhill.sps.mot.com (Carl Ponder) writes:
> Can anyone recommend a tool that can do (or come close to doing) the  
following?
[description of design tool deleted]

You didn't mention what platform you use, but you just gave a subset of  
the feature list for Diagram (available only on the NeXT).

DL
---
David Lewis
Senior Software Engineer
On contract to: Federal National Mortgage Association (Fannie Mae)
dlewis@fnma.com (NeXTmail OK), 202-752-4785
Newsgroups: comp.object
From: bumesh@cat.syr.EDU
Subject: Re: active objects (was: rethinking the Object Paradigm)
In-reply-to: cjmchale@dsg.cs.tcd.ie's message of Wed, 20 Jan 1993 17:19:36 GMT
Organization: Syracuse University
	<1993Jan16.144040.12684@daimi.aau.dk> <172@eiffel.eiffel.com>
	<1993Jan20.171936.1301@dsg.cs.tcd.ie>
Date: Thu, 21 Jan 93 14:01:08 EST

>>>>> On Wed, 20 Jan 1993 17:19:36 GMT, cjmchale@dsg.cs.tcd.ie (Ciaran McHale) said:

Ciaran> I had used the term "active object" to refer to languages such as POOL
Ciaran> (Pierre America) or Eiffel || (Denis Caromel) in which an object has a
Ciaran> single thread. This thread is used to both (i) schedule the order in
Ciaran> which messages/invocations where to be serviced, and (ii) service them
Ciaran> itself. Since there is just a single thread inside the object, all
Ciaran> operations execute in mutual exclusion. Actually, now that I think of
Ciaran> it, I think I used the term "single-threaded, active objects" to refer
Ciaran> to such languages.

I don't see how threads really make any difference. What we really
should be concerned about is the mapping of activity to CPUs. Given a 
single CPU machine it does not make any sense to have an object which
can have multiple threads at all. You could easily have a model in
which we have multiple threads per object but this does not result in
tru concurrency. 

Ciaran> ..... (stuff deleted)
Ciaran> Does anybody have a definitive definition of what "active" means?
Ciaran> Failing that, what are the different definitions which the other
Ciaran> participants are using?

Active should essentially mean the ability to perform computation.

Ciaran> Ciaran.

-umesh
--


-umesh
Newsgroups: comp.object
From: campbell@src.honeywell.com (Terry Campbell)
Subject: Re: The difference between smalltalk/v and smalltalk/80
Originator: campbell@analysis.src.honeywell.com
Organization: Honeywell Systems & Research Center, Mpls. MN, USA.
	<1993Jan15.115634.62092@qut.edu.au> <1993Jan15.120050.62093@qut.edu.au>
	<1993Jan19.020351.5860@cc.gatech.edu>
Date: Fri, 22 Jan 1993 19:17:10 GMT


In article <1993Jan19.020351.5860@cc.gatech.edu> gt0054b@prism.gatech.edu (E. J. Lee) writes:

> MVC takes the approach that there are THREE parts of an application, an
> application domain part, the "model", a purely graphical part, the
> "view" and a purely interactive part, the "controller".  In general,
> views and controllers come in tightly linked pairs.  For instance, the
> standard text editor comes with a controller specifically designed for
> text editing.  Likewise SelectionInListViews have their own specific
> controllers, etc.  A model will create one or more views on itself to
> interpret user actions in terms of its application domain.  When a view
> "opens" itself, it will create an instance of its specific controller to
> handle its user input.


>> The thing that confuses me most is the separation of view and controller.
>> What would be an example of a view with multiple controllers or vice-
>> versa?

I had occasion to use this paradigm in a graphical editing application I
developed.  I used the typical tool pane with icons to select the drawing
tools I was interested in and a graphPane for drawing.  Each tool button
selected a mini-controller that interpreted user gestures in the context of
the selected tool.  Thus, a line tool acted differently to clicks and drags
etc, than a box tool.  Alternative ways of doing this of course include
keeping a state for the application and using case statements (or dynamically
dispatching via. perform:).  I found the seperation of gesture handling into
multiple controllers sharing the same view to be useful as it allowed me to
group related bahavior into classes.
From: pheras@rediris.es
Newsgroups: comp.object
Subject: Re: Rethinking the Object Paradigm
Date: 21 Jan 93 19:37:23 +0100
Organization: REDIRIS, Red Nacional de I+D

  In a previous article in this thread I wrote:

> and I've no found a better study about these topics than in the works of 
> Dr. Oscar Nierstratz and Dr. Papathomas, from CWI, Swiss.
> 
> They have a hierarchy for classifying the languages according to the
> integration of the concurrency issues in the OO languages, which they explain
> through several papers, available by anonymous ftp at cwi.unige.ch.
> 


  Three important errors:

  It's not Dr. Nierstratz but Dr. Nierstrasz

  It's not CWI, but CUI, which stands for "Centre Universitaire d'Informatique"

  It's not cwi.unige.ch but cui.unige.ch

I apologize.



Pedro de las Heras.
 
Newsgroups: comp.object
From: jb8285@medtronic.COM (Jeffrey R. Brown)
Subject: Re: Maintenance and OO
Organization: Medtronic, Inc.
X-Newsreader: TIN [version 1.1 PL8]
Date: Thu, 28 Jan 1993 14:58:19 GMT

There is a good article on this topic in the January 1993 issue of
IEEE Software:

   Wilde, Matthews, & Huitt, _Maintaining Object-Oriented Software_

I'll try to boil down their article to 25 words or so:  It is harder
for a maintenance programmer to understand an object-oriented program
(compared to "traditional" programming).  Once that is done, though,
the maintenance is easier.

--
"The comments and opinions expressed above are mine and do not necessarily
represent the official position or views of Medtronic, Inc."
Jeffrey R. Brown
Internet: jeffrey.brown@medtronic.com             Voice: 1-612-574-4698
UUCP:     uunet!medtron!jb8285                    FAX:   1-612-574-6150
Newsgroups: comp.object,comp.lanq.smalltalk
From: terry@zoe.network23.com (Terry)
Subject: Object-Oriented visual programming interface
Organization: Mystech Associates
Date: Wed, 27 Jan 1993 18:19:15 GMT

I am in the process of constructing an object-oriented
engineering tool and I need to provide the user with
some kind of programming facility.  I would like to use
a visual programming interface instead of a text interface.
I am developing the tool in Smalltalk so it would be a
benefit if the programming interface could be designed to
generate Smalltalk code.  Does anyone have any
recommendations as to where I should begin?

Thanks for your help.

Terry
-- 
terry@zoe.network23.com
{rayssd,xanth,mirror,att}!galaxia!zoe!terry
Newsgroups: comp.object