Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!munnari.oz.au!goanna!wren!ajk From: ajk@wren.cs.rmit.OZ.AU (Alan Kent) Newsgroups: comp.lang.misc Subject: Re: Run-time Type Errors in Smalltalk Message-ID: Date: 13 May 91 07:49:50 GMT References: <2604@calmasd.Prime.COM> <1991May9.023313.28308@tkou02.enet.dec.com> <1991May13.061520.11992@daffy.cs.wisc.edu> Sender: news@goanna.cs.rmit.oz.au Lines: 42 quale@khan.cs.wisc.edu (Douglas E. Quale) writes: >This statement suggests that programs compiled in dynamic languages contain >more type errors than similar programs written in statically typed languages. >Unfortunately I don't know of any studies that have been made that could >definitively affirm or deny this. In fact, I don't know of any evidence at >all that points one way or the other. I also do not know of any studies, and have been a little swayed towards dynamic typing by the arguments presented in this group. However I still have some doubts. For example, what calibre are the programmers who are using these dynamic languages? For large projects out in industry, it is less likely that you will have a team of hot-shot programmers. Good programmers are likely to do a good job in any language. But what about the not so good programmers. Maybe they need more hand-holding as provided by a static language. Are most of the people using dynamic languages more research oriented (and so hopefully better trained)? The other argument I have for static typing is that it is a form of very formal documentation. Using types specifies exactly how you expect a piece of code to be used - exactly what values can be passed to a function and what can be returned from a function. Sure, a clever compiler may be able to determine these things. But that is not a form of documentation for users. Sure, you could just use comments. But from my limited experience in large projects, its very easy to get lazy and leave some out. Most software does not just have to get written. It has to be maintained later, often by someone who did not write the original program. My main complaint with static typing is that there are not many languages that do a good job of it. C is pretty bad. Pascal is too inflexible. Eiffel, while it may have problems, is certainly a step better. It seems to me it is not the concept of static typing which is the problem, but rather that not many statically typed languages do a very good job. Oh well, that is my 2 cents worth, if its worth even that! :-) Dr Alan Kent Comp Sci, RMIT, Melbourne, Australia ajk@goanna.cs.rmit.oz.au