Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!rpi!bu.edu!m2c!umvlsi!dime!yodaiken From: yodaiken@chelm.cs.umass.edu (victor yodaiken) Newsgroups: comp.lang.misc Subject: Re: Dynamic typing (part 3) Message-ID: <28742@dime.cs.umass.edu> Date: 3 Apr 91 12:36:52 GMT References: <1991Apr1.010526.26781@neon.Stanford.EDU> <1APR91.23564447@uc780.umd.edu> <28673@dime.cs.umass.edu> <3APR91.00020019@uc780.umd.edu> Sender: news@dime.cs.umass.edu Reply-To: yodaiken@chelm.cs.umass.edu (victor yodaiken) Organization: University of Massachusetts, Amherst Lines: 31 In article <3APR91.00020019@uc780.umd.edu> cs450a03@uc780.umd.edu writes: >Did I say no type declarations? I said dynamic typing. > >The advantage of dynamic typing is not "no type declarations", the >advantage is that redundant type declarations can be eliminated. >[Actually, this property is not unique to dynamically typed languages. >But DTLs are more consistent in this regard than are STLs.] > >For example, if F(x) is defined as G(h(q(x))), and the domain of q is >balogna sandwiches, then the domain of F is balogna sandwiches, and >x can only take on values that are balogna sandwiches. Using q in >this manner is sufficient to declare the type of F. > This makes sense, but it seems to be an instance of an abbreviation or convention. There is a preface: all functions are asumed to be over balogna sandwiches, implied in what you write. If what you mean by "dynamic typing" is simply greater facility in defining domains and higher level declarations of type (e.g., all functions in the block are over integers), then I believe that I understand. But, it appeared from earlier discussion that dynamic typing was more involved. >Another advantage of dynamic typing is that you get a defined behavior >when a function gets a value which is out of its domain (e.g. divide >by zero, or array index with index too large). Again, this is not >unique to DTLs -- and again, DTLs are more consistent about this than >STLs. > I'm really lost now. What is the connection between type dynamism and well definedness of operations?