Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!noao!ncar!gatech!udel!ee.udel.edu From: new@ee.udel.edu (Darren New) Newsgroups: comp.lang.misc Subject: Re: Dynamic typing -- To Have and Have Not (was Runti Message-ID: <46686@nigel.ee.udel.edu> Date: 6 Mar 91 05:23:53 GMT References: <584@coatimundi.cs.arizona.edu> <1991Mar6.024730.19073@engage.enet.dec.com> Sender: usenet@ee.udel.edu Organization: University of Delaware Lines: 39 Nntp-Posting-Host: estelle.ee.udel.edu >|> > This is besides the point, but what's an untyped language then? Not to put words in anybody's mouth, but the post you are responding to says >People assume "untyped" means that a language >has no types, but it really just means that syntactic elements don't >have types. (Notice how I cleverly delete all "he wrote/she wrote" headers to avoid getting this wrong :-) Anyway, having a strong Smalltalk background, I interpret this to essentially to be saying that values have types but not variables. The declaration of a variable is just mentioning its name at the correct place within the method, without any formal declaration of the values that variable is allowed to hold. Values in Smalltalk most definitely have types, and types are even first-class objects. Also, in an `untyped' language, expressions return values (which have types) but since the same static expression can return values of different type, the expression itself cannot be siad to have a specific type. For example, Smalltalk allows arrays to have values of different types in different positions of the array. Hence, x := (array at: 5) is not a specific type, even though at any given time that expression will return a value of a given type and assign that value to x. x will nevertheless be untyped. Contrast with C, wherein one says (x = array[4]). Depending on the declaration of `array', I can tell the type of the value array[4]. I can also know the type of the variable x. Well, I hope that clears that up, and that I haven't misrepresented what was being said. -- Darren -- --- Darren New --- Grad Student --- CIS --- Univ. of Delaware --- ----- Network Protocols, Graphics, Programming Languages, Formal Description Techniques (esp. Estelle), Coffee, Amigas ----- =+=+=+ Let GROPE be an N-tuple where ... +=+=+=