Article View: comp.lang.misc
Article #4023Re: Run-time Type Errors in Smalltalk
From: Rob Strom
Date: Tue, 21 May 1991 15:57
Date: Tue, 21 May 1991 15:57
43 lines
2927 bytes
2927 bytes
In article <1991May17.051840.26916@daffy.cs.wisc.edu>, quale@saavik.cs.wisc.edu (Douglas E. Quale) writes: |> In article <1991May17.011209.29486@tkou02.enet.dec.com> diamond@jit533.enet@tkou02.enet.dec.com (Norman Diamond) writes: |> >In article <1991May16.153308.4054@spool.cs.wisc.edu> quale@picard.cs.wisc.edu (Douglas E. Quale) writes: |> > |> >>Dynamically typed languages are safer than primitive statically typed |> >>languages such as C. |> > |> >No. Dynamically typed languages are safer than C. Statically typed |> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |> |> I believe that's what I said. |> |> |> Primitive statically typed languages are languages that practically force the |> programmer to use an unchecked simulation of dynamic typing. For a start |> they generally lack polymorphism, and frequently have little support for |> generics at all. Sadly, a vast majority of the programs written in static |> languages are in languages that have very primitive type systems. Let me give you the perspective of someone who is designing and implementing "better" statically typed languages. If you want to argue that languages (like C) with incomplete static type checking and no runtime checking are unsafe, you'll get enthusiastic agreement from me. But if you want to argue that therefore there's something intrinsically wrong with static typing and that we should use dynamic typing instead, you'll get enthusiastic disagreement from me. I agree with you that nonsensical operations should never be executed. I believe that wherever possible nonsensical operations should be avoided by static analysis, and where this is not possible, they should be avoided by runtime checks. I have previously posted my opinion that most of the time, it is reasonable to statically declare the types of values a variable can hold. For certain kinds of situations it is not. That is why our language makes static the usual case, and dynamic the unusual case, while allowing both. -- Rob Strom, strom@ibm.com, (914) 784-7641 IBM Research, 30 Saw Mill River Road, P.O. Box 704, Yorktown Heights, NY 10958
Technical Details
Message-ID:
<1991May21.155753.8615@watson.ibm.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!wuarchive!uunet!bywater!arnor!andreadoria!stromReferences:
<1991May16.011804.21042@tkou02.enet.dec.com> <1991May16.153308.4054@spool.cs.wisc.edu> <1991May17.011209.29486@tkou02.enet.dec.com> <1991May17.051840.26916@daffy.cs.wisc.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!wuarchive!uunet!bywater!arnor!andreadoria!strom From: strom@watson.ibm.com (Rob Strom) Newsgroups: comp.lang.misc Subject: Re: Run-time Type Errors in Smalltalk Message-ID: <1991May21.155753.8615@watson.ibm.com> Date: 21 May 91 15:57:53 GMT References: <1991May16.011804.21042@tkou02.enet.dec.com> <1991May16.153308.4054@spool.cs.wisc.edu> <1991May17.011209.29486@tkou02.enet.dec.com> <1991May17.051840.26916@daffy.cs.wisc.edu> Sender: news@watson.ibm.com (NNTP News Poster) Reply-To: strom@andreadoria.watson.ibm.com (Rob Strom) Organization: IBM T.J. Watson Research Center Lines: 43 Nntp-Posting-Host: andreadoria