Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!usc!sdd.hp.com!spool.mu.edu!news.nd.edu!mentor.cc.purdue.edu!purdue!haven!adm!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.lang.misc Subject: Re: Dynamic typing (part 3) Message-ID: <26221:Mar1510:17:4991@kramden.acf.nyu.edu> Date: 15 Mar 91 10:17:49 GMT References: <651@optima.cs.arizona.edu> Organization: IR Lines: 48 In article <651@optima.cs.arizona.edu> gudeman@cs.arizona.edu (David Gudeman) writes: > The point is the essential arbitrariness of type declarations. There > is no good verification-based reason to distinguish between ints and > floats and not distinguish between natural and integer, or between > non-zero and with-zero. So? If you want to distinguish between the naturals with and without zero, use Ada. > ] Once you've built up a large type library, the chances that any one > ]person has a detailed gestalt of the whole thing is very unlikely. Therefore, > ]unless you explicitly restrict the type of a value you receive, you can only > ]assume that it's any type. > (Whew. Back to serious stuff.) You generally don't build up large > type libraries like that with dynamically typed languages. There are > a few generic aggregate types that serve for most data structuring > purposes. You don't have to implement stacks, hash tables, > concatenatable arrays or other things. Unfortunately, the programming world is full of naturally complex data structures. You can point to at least half of the typically fifty-odd elements of the UNIX inode structure, for example, and give good reasons why those elements must be in the structure, even though they require all sorts of special operations. Even simple data structures like Patricia require dozens of operations for a complete implementation. > ] Again, one more time, with feeling, my concern is with large software > ]systems. > Again, I don't believe that required static typing is in any sense, in > any software system, more reliable than dynamic typing. Fer cryin' out loud, who cares? I don't think any language designer will take pains to *stop* you from using dynamic typing; if enough people agree with you that dynamic typing is useful, then you can distribute your library and be done with it. Nobody's stopping you from writing your software with dynamic typing in practically any language. Just stop pestering the people who prefer static typing in the same languages. > On the contrary, that's where the advantages of dynamically typed > languages really shine. The programs are much more maintainable and > "evolvable". This smacks of religion. Have you compared dynamically typed and statically typed programs solving similar problems? Have you observed the programs over their useful life and seen how much programmer effort went into them? ---Dan