Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!sunic!news.funet.fi!tukki.jyu.fi!sakkinen From: sakkinen@jyu.fi (Markku Sakkinen) Newsgroups: comp.object Subject: Re: A Hard Problem for Static Type Systems Message-ID: <1991May9.052645.29470@jyu.fi> Date: 9 May 91 05:26:45 GMT References: <2479@m1.cs.man.ac.uk> <1158@tetrauk.UUCP> <2500@m1.cs.man.ac.uk> Reply-To: sakkinen@jytko.jyu.fi (Markku Sakkinen) Organization: University of Jyvaskyla, Finland Lines: 22 In article <2500@m1.cs.man.ac.uk> mario@cs.man.ac.uk (Mario Wolczko) writes: > ... >I will make only two further observations: > ... >2. The most common "type error" in Smalltalk is sending a message to > nil, ie forgetting to initialize a variable. Static typing doesn't > help here at all. Right, with type systems defined as they usually are, trying to access 'nil' cannot be caught as a type error even in statically typed languages. The story becomes different if pointer types as such are defined as "strict", i.e. 'nil' not allowed, and conventional (possibly 'nil') pointers are then regarded as union types. Of course, one could not very well build typical dynamic, recursive data structures using only strict pointers. Markku Sakkinen Department of Computer Science and Information Systems University of Jyvaskyla (a's with umlauts) PL 35 SF-40351 Jyvaskyla (umlauts again) Finland SAKKINEN@FINJYU.bitnet (alternative network address)