Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!hplabs!otter.hpl.hp.com!otter!sfk From: sfk@otter.hpl.hp.com (Steve Knight) Newsgroups: comp.lang.misc Subject: Re: Optional static typing limits Message-ID: <2400044@otter.hpl.hp.com> Date: 18 Apr 91 13:55:15 GMT References: Organization: Hewlett-Packard Laboratories, Bristol, UK. Lines: 21 Dan writes: > I wonder if we can raise the level of the dicussion > on static vs dynamic types to consider more generally where > static typing fails to be sufficient or convenient, and why. My view is that the key issues for convenience are arbitrary unions and, by implication, arbitrary subtyping. The advantage of dynamic typing is essentially that any collection of types is itself a valid type & that any collection of types can be extended so as to become a super-type or restricted to form a sub-type. He also asks: > I am also interested in the various ways languages that support > *optional* static typing limit the extent of static typing one can do, > and why. The obvious cost of this is that type inference is severely restricted. Furthermore, it is not possible (in general) to find a most general type for an expression in such a system. Steve