🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #3572

RE: Type Systems and Dynamic Binding

#3572
From: cs450a03
Date: Wed, 17 Apr 1991 21:05
35 lines
1968 bytes
Dan Bernstein writes:

>For each EXAMPLE of dynamic typing that people put up, I showed how
>it would typically be implemented (directly) in C. I hope you can see
>the difference between this and what you're talking about.

heh heh heh... Excellent :-) 

 f(x, y)
LIMIT ERROR

------------------------

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.  Let's say that I can not accept a severe performance
hit for this checking (most of the time, it's not going to happen.
When it does happen, I'm going to switch to float -- performance must
be better than floating point).

Now, I know that this sort of information is available if I was
working in assembly (I'm not working on a pathologically silly
machine).  But how would I do it in C?  As near as I can tell, C just
throws the information away.

This is a _very_ simple sort of test.  I'd want to detect erroneous
results for every primitive expression I built into the language.
These tests would be less significant (in terms of time and space)
than simple housekeeping (loads and stores, loop management, etc.) if
I were working in assembly.

How do I do it?

Raul Rockwell
Technical Details
Message-ID: <17APR91.21054415@uc780.umd.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!boingo.med.jhu.edu!haven!ni.umd.edu!uc780.umd.edu!cs450a03
References: <3843@ssc-bee.ssc-vax.UUCP> <27313:Apr1623:30:0391@kramden.acf.nyu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!boingo.med.jhu.edu!haven!ni.umd.edu!uc780.umd.edu!cs450a03
From: cs450a03@uc780.umd.edu
Newsgroups: comp.lang.misc,comp.object
Subject: RE:  Type Systems and Dynamic Binding
Message-ID: <17APR91.21054415@uc780.umd.edu>
Date: 17 Apr 91 21:05:44 GMT
References: <3843@ssc-bee.ssc-vax.UUCP> <27313:Apr1623:30:0391@kramden.acf.nyu.edu>
Sender: usenet@ni.umd.edu (USENET News System)
Organization: The University of Maryland University College
Lines: 35
Nntp-Posting-Host: uc780.umd.edu