🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #3602

Re: Type Systems and Dynamic Binding

#3602
From: Dan Bernstein
Date: Fri, 19 Apr 1991 09:04
20 lines
1519 bytes
In article <17APR91.21054415@uc780.umd.edu> cs450a03@uc780.umd.edu writes:
> Let's say I was trying to implement a dynamically typed language in C.
> (Of course, I wouldn't _really_ be that crazy  :-)  Let's say I wanted
> to detect when, for instance, the addition of 2 integers produces an
> invalid result.

Okay, I know what you're about to say, and I agree with you completely.
One of the problems with C is that it supports so few arithmetic
operations: my favorite example is getting the high word of a multiply,
Herman Rubin's favorite example is dividing two floats and getting an
integer quotient and float remainder, and your example here is adding
two integers and getting an exception of some sort upon overflow. (Note
that any good language or library would provide both the unrestricted
operation of add-with-undefined-effects-upon-overflow and the restricted
operation here.)

Now what does this have to do with dynamic typing? Exception handling is
not dynamic typing.

---Dan
Technical Details
Message-ID: <25968:Apr1909:04:5791@kramden.acf.nyu.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!hsdndev!cmcl2!kramden.acf.nyu.edu!brnstnd
References: <3843@ssc-bee.ssc-vax.UUCP> <27313:Apr1623:30:0391@kramden.acf.nyu.edu> <17APR91.21054415@uc780.umd.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!hsdndev!cmcl2!kramden.acf.nyu.edu!brnstnd
From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein)
Newsgroups: comp.lang.misc,comp.object
Subject: Re:  Type Systems and Dynamic Binding
Message-ID: <25968:Apr1909:04:5791@kramden.acf.nyu.edu>
Date: 19 Apr 91 09:04:57 GMT
References: <3843@ssc-bee.ssc-vax.UUCP> <27313:Apr1623:30:0391@kramden.acf.nyu.edu> <17APR91.21054415@uc780.umd.edu>
Organization: IR
Lines: 20