Article View: comp.lang.misc
Article #3737Re: definitions
From: victor yodaiken
Date: Fri, 03 May 1991 10:44
Date: Fri, 03 May 1991 10:44
47 lines
2874 bytes
2874 bytes
In article <2494@optima.cs.arizona.edu> gudeman@cs.arizona.edu (David Gudeman) writes: >I've decided to be a little more explicit about the fact that typing >refers to machine representations, since that seems to be the major >difference between the two extreme views. In other words, if typing >only refers to an arbitrary set of values, then most of the >differences of opinion disappear. > >Typing: the machine representation of a value. You must know the >typing of a memory location to know how to interpret the bits as a >value. > Oh, well, here's the problem. To me a "type" is not necessarily a machine-related notion. The "type" of a mathematical object refers to the operations which are meaningful on the object and the laws which govern the behavior of the object. For example "1" can be an element of a boolean algebra, the identity element of a group, an integer, or an abbreviation for the textual symbol "successor(zero())". Depending on the type which we assign to "1" we will interpret "1+1" differently. >Static typing: the assignment of a typing to all the values that a >given syntactic expression might produce. This is generally >implemented by having the programmer declare the typings of the >variables, and then inferring the typing of compound expressions by the >types of the operations. > >Dynamic typing: a programming language feature where the typing of a >value can be determined from the value alone, without reference to the >way in which the value is used. This is generally implemented by >adding a type tag to all values at runtime. Note that since the sizes >of values are not known statically, some form of automatic storage >management is needed to implement dynamic typing. > >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 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. > In fact, "dynamic typing" as you have defined it, forbids strong typing unless we are willing to allow for "bad type" aborts and to consider these to be well defined results.
Technical Details
Message-ID:
<30039@dime.cs.umass.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!bu.edu!m2c!risky.ecs.umass.edu!dime!yodaikenReferences:
<2494@optima.cs.arizona.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!bu.edu!m2c!risky.ecs.umass.edu!dime!yodaiken From: yodaiken@chelm.cs.umass.edu (victor yodaiken) Newsgroups: comp.lang.misc Subject: Re: definitions Message-ID: <30039@dime.cs.umass.edu> Date: 3 May 91 10:44:15 GMT References: <2494@optima.cs.arizona.edu> Sender: news@dime.cs.umass.edu Reply-To: yodaiken@chelm.cs.umass.edu (victor yodaiken) Organization: University of Massachusetts, Amherst Lines: 47