Article View: comp.arch
Article #3516Polymorphism (Re: why tagged immediate floats are good)
From: Nick Rothwell
Date: Mon, 19 Mar 1990 11:34
Date: Mon, 19 Mar 1990 11:34
49 lines
2924 bytes
2924 bytes
In article <6143@crdgw1.crd.ge.com>, chao@sunflower (William Chao) writes:
>In the paper "Basic Polymorphic typechecking," by Luca Cardelli,
>Science of Computer Programming 8 (1987) pp. 147-172. On page 150:
>-----------------------------------------------------------------------
>Polymorphism in language comes from the interaction of two contrasting
>programming language design goals: static typing and reusability.
> :
> :
>Polymorphic type systems try to reconcile these two goals
>by providing all the safety of statically typed languages,
>and most (but not all) the flexibility of untyped languages.
>-----------------------------------------------------------------------
>My 1st question: Why he says "but not all?"
You can't, for example, create a list of a mixture of objects of
different types, like you can in untyped languages.
(Well, there are more uptodate features that allow this kind of
thing, like open-ended variant types, but Cardelli's paper
is quite old.)
>2nd question: It seems that the "full" flexibility of untyped languages
> will never be achieved by static typing, then static binding.
> Does this imply that we got to have dynamic binding to accomplish
> the full reusability?
I'd rather have static typechecking than "full reusability", whatever
that might mean.
>3rd question: People (especially real-time systems) are against dynamic binding
> because it is too slow. Some people use the same reason (too
> slow) to against object-oriented programming. Can we do somethings
> about this?
I don't personally care for dynamic binding or dynamic typechecking.
Regarding OO: I feel that a fair amount of static analysis in a
compiler could cut out a lot of the (currently) dynamic work; but,
I feel that OO languages are currently too ill-defined semantically
to approach this problem in a formal manner.
>I will appreciate whoever in this news group gives me the answer.
You're welcome.
Nick.
--
Nick Rothwell, Laboratory for Foundations of Computer Science, Edinburgh.
nick@lfcs.ed.ac.uk <Atlantic Ocean>!mcsun!ukc!lfcs!nick
~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~ ~~
A prop? ...or wings? A prop? ...or wings? A prop?
Technical Details
Message-ID:
<2916@castle.ed.ac.uk>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcsun!ukc!edcastle!lfcs!nickReferences:
<1990Mar10.234555.150@Neon.Stanford.EDU> <6143@crdgw1.crd.ge.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcsun!ukc!edcastle!lfcs!nick From: nick@lfcs.ed.ac.uk (Nick Rothwell) Newsgroups: comp.arch Subject: Polymorphism (Re: why tagged immediate floats are good) Keywords: garbage collection, generational garbage collection, floating point Message-ID: <2916@castle.ed.ac.uk> Date: 19 Mar 90 11:34:03 GMT References: <1990Mar10.234555.150@Neon.Stanford.EDU> <6143@crdgw1.crd.ge.com> Reply-To: nick@lfcs.ed.ac.uk (Nick Rothwell) Organization: Jenny Agutter Appreciation Society of Edinburgh Lines: 49 In-reply-to: chao@sunflower.crd.ge.com (William Chao)