🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #3990

Re: Run-time Type Errors in Smalltalk

#3990
From: Norman Diamond
Date: Fri, 17 May 1991 01:12
40 lines
3084 bytes
In article <1991May16.153308.4054@spool.cs.wisc.edu> quale@picard.cs.wisc.edu (Douglas E. Quale) writes:
>In article <1991May16.011804.21042@tkou02.enet.dec.com> diamond@jit533.enet@tkou02.enet.dec.com (Norman Diamond) writes:
>>[ugly C syntax to do programmer-computed dynamic typing of some X11 values]
>I think there are reasons why the X Toolkit Intrinsics doesn't do this.
>One of the design goals was binary compatibility with past versions.

Uh, if you want binary compatibility between existing C code and a
dynamically-typed language, you'll have a lot of problems.  When we
were discussing whether static typing eliminates all possibility of
tagging and type-checking, I thought we were talking about programs
that might be written by competent programmers, not about binary
compatibility with random nonsense.

>Notice that when you are forced to simulate dynamic typing in a statically
>typed language you can't do it as well as a dynamically typed language can.

Of course.  I did say that when dynamic typing is necessary, the programmer
should be able to tell the compiler to do it; and when efficiency or strict
early static checking are necessary, the programmer should be able to tell
the compiler to do that too.  And that C is not an encouraging basis for
programmer simulation of either of these.

>The explicit tags are bulky and slow compared to the representation tricks
>used by lisp compilers.  Also the syntax is abominable, as you mentioned.

Yes.  And as I said, the Pascal language supported exactly this kind of tag,
and nothing would stop a Pascal compiler from using representation tricks.
(Although if the programmer for some reason demands ord() of the tag, then
there will have to be code to convert from the tricky representation.)

>Dynamically typed languages are safer than primitive statically typed
>languages such as C.

No.  Dynamically typed languages are safer than C.  Statically typed
languages are also safer than C.  Languages that permit the programmer to
specify each kind of typing when necessary will be safer than all of the above.
--
Norman Diamond       diamond@tkov50.enet.dec.com
If this were the company's opinion, I wouldn't be allowed to post it.
Permission is granted to feel this signature, but not to look at it.
Technical Details
Message-ID: <1991May17.011209.29486@tkou02.enet.dec.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!decwrl!pa.dec.com!jrdzzz.jrd.dec.com!tkou02.enet.dec.com!jit533!diamond
References: <1991May13.082152.29294@tkou02.enet.dec.com> <1991May15.141839.20603@daffy.cs.wisc.edu> <1991May16.011804.21042@tkou02.enet.dec.com> <1991May16.153308.4054@spool.cs.wisc.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!decwrl!pa.dec.com!jrdzzz.jrd.dec.com!tkou02.enet.dec.com!jit533!diamond
From: diamond@jit533.swstokyo.dec.com (Norman Diamond)
Newsgroups: comp.lang.misc
Subject: Re: Run-time Type Errors in Smalltalk
Message-ID: <1991May17.011209.29486@tkou02.enet.dec.com>
Date: 17 May 91 01:12:09 GMT
References: <1991May13.082152.29294@tkou02.enet.dec.com> <1991May15.141839.20603@daffy.cs.wisc.edu> <1991May16.011804.21042@tkou02.enet.dec.com> <1991May16.153308.4054@spool.cs.wisc.edu>
Sender: usenet@tkou02.enet.dec.com (USENET News System)
Reply-To: diamond@jit533.enet@tkou02.enet.dec.com (Norman Diamond)
Organization: Digital Equipment Corporation Japan , Tokyo
Lines: 40