🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #3688

Re: definitions

#3688
From: Raul Rockwell
Date: Mon, 29 Apr 1991 02:05
56 lines
2614 bytes
I mostly agree with the recent posts giving definitions of things like
dynamic/static typing, ...  But I think the definitions given for
Strong typing were a bit cloudy.

David Gudeman  []
[] Strong typing: the feature that an operation cannot return an
[] undefined result because it did not know the typing of one of its
[] operands.

Strong typing also means that the function will terminate.

[] Strong static typing is implemented by only allowing operators to
[] be applied to operands whose typing can be statically inferred to
[] be correct for that operator.
[] Strong dynamic typing is implemented by having each operator
[] dynamically check the type tags of its operands to make sure they
[] are correct.

Note that checking type tags, without checking operand values is not
adequate for all cases.  This is why you cannot statically insure that
an inverse function is being applied to operands which are correct for
that function (or operator).

Darren New ::
:: Strong typing: values of the wrong type cannot be stored into
:: accessors (i.e., lvalues, function parameters, etc)

I believe this is static typing, not strong typing.

:: and functions may not be applied to values outside of their domain
:: without a compiletime or runtime error.

This, however, is strong typing.

:: (Note: a catchable runtime error (or exception), like "message not
:: understood" in Smalltalk, is not a runtime error. A non-catchable
:: error, like "new" running out of space in Pascal, is a runtime
:: error.)

Talk about foggy explanations ;-)

Maybe we need to define "error" ?

:: Values of the wrong type are assumed to possibly have incompatible
:: representations; i.e., valid integers may not be valid floats, etc.

"assumed to possibly" ???

I suppose this could mean that you can have an integer bignum which is
too large to represent using floating point notation in some
implementation of a language???

In any event, I don't think this is a meaningful way of describing
strong typing.

Raul Rockwell
Technical Details
Message-ID: <333124@socrates.umd.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!udel!haven.umd.edu!socrates.umd.edu!socrates!rockwell
References: <2494@optima.cs.arizona.edu> <51984@nigel.ee.udel.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!udel!haven.umd.edu!socrates.umd.edu!socrates!rockwell
From: rockwell@socrates.umd.edu (Raul Rockwell)
Newsgroups: comp.lang.misc
Subject: Re: definitions
Message-ID: <333124@socrates.umd.edu>
Date: 29 Apr 91 02:05:10 GMT
References: <2494@optima.cs.arizona.edu> <51984@nigel.ee.udel.edu>
Sender: rockwell@socrates.umd.edu (Raul Rockwell)
Organization: Traveller
Lines: 56
In-Reply-To: gudeman@cs.arizona.edu's message of 26 Apr 91 21: 37:28 GMT