Newsgroups: comp.object,comp.lang.eiffel,comp.lang.c++,comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!nntp.sei.cmu.edu!news.psc.edu!hudson.lm.com!newsfeed.pitt.edu!gatech!howland.reston.ans.net!ix.netcom.com!netcom.com!NewsWatcher!user
From: hbaker@netcom.com (Henry Baker)
Subject: Re: Why is one OO language more productive than another?
Message-ID: <hbaker-2508950831210001@192.0.2.1>
Sender: hbaker@netcom17.netcom.com
Organization: nil organization
References: <40t027$7j9@hardcopy.ny.jpmorgan.com> <40t7veINNe25@bhars12c.bnr.co.uk> <40tcq2$10fa@tigger.cc.uic.edu> <40vashINNgo8@bhars12c.bnr.co.uk> <4101pg$dhr@ixnews4.ix.netcom.com> <412o0s$fuq@ornews.intel.com> <41aal8$46ig@tigger.cc.uic.edu> <26dvkr$02j@zoe.pcix.com> <41d43j$1h20@tigger.cc.uic.edu> <26fRWt$02m@zoe.pcix.com> <dqua.809168272@dqua> <41fvk7$sso@ornews.intel.com> <41gdap$30mc@tigger.cc.uic.edu> <41igf9$bio@ixnews2.ix.netcom.com> <41jjsb$2lou@tigger.cc.uic.edu> <26h5Zh$02s@zoe.pcix.com>
Date: Fri, 25 Aug 1995 16:31:21 GMT
Lines: 40
Xref: glinda.oz.cs.cmu.edu comp.object:37484 comp.lang.eiffel:10603 comp.lang.c++:145958 comp.lang.smalltalk:27642

In article <26h5Zh$02s@zoe.pcix.com>, traymond@pcix.com (Terry Raymond) wrote:

> Well, lets put it this way.  It seems that the languages that
> have the highest programmer productivity are untyped.
                                               ^^^^^^^

Please, please, be more precise.  Languages like Lisp & Smalltalk are
_dynamically_ typed, they aren't 'untyped'.  I would consider a language
like assembly language to be 'untyped'.

Dynamically-typed languages _do_ check for typing errors, and most of them
check very carefully.  The reason is that the garbage collector needs to
know what the type of an object is in order to trace/copy it.

Some 'dynamically-typed' languages offer compilers which are pretty clever
about dataflow analysis and which can elide the type checks when they can
prove rigorously that the checks aren't needed.

The major reason for having dynamic typing and/or type loopholes is that
one can prove mathematically that a language which is capable of static
type checking is strictly less expressive than one which does its checking
at runtime.

The simplest examples of these differences that I can think of off the top of my
head involve emulating the lambda calculus 'Y' operator, in which a _function_
is passed as an argument to itself.  If you look rigorously at some of the
details of any OO language type system, you will find this sort of thing at
the heart of the system.  Unfortunately, most static type systems will not
let you build your own OO type system within the language, which is why
OO type systems are usually hard-wired into the language.

If you care about such things, you might want to look at the following
papers:

ftp://ftp.netcom.com/pub/hb/hbaker/Iterator.html (also .ps.Z)
ftp://ftp.netcom.com/pub/hb/hbaker/OOAdaLetters.html (also .ps.Z)

-- 
www/ftp directory:
ftp://ftp.netcom.com/pub/hb/hbaker/home.html
