Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!decvax!duke!mcnc!ncsu!mauney From: mauney@ncsu.UUCP Newsgroups: net.lang Subject: Re: Strong Typing and Ignorance Message-ID: <2426@ncsu.UUCP> Date: Fri, 16-Dec-83 15:21:55 EST Article-I.D.: ncsu.2426 Posted: Fri Dec 16 15:21:55 1983 Date-Received: Tue, 27-Dec-83 03:13:39 EST Lines: 29 References: unc.6421 In their book "Programming Language Concepts" (Wiley, 1982), Ghezzi and Jazayeri define a language to be strongly typed "if it allows all type checking to be done statically". This definition is similar that given by Tim Maroney (unc.6421). Although the above is an adequate theoretical definition of strong typing, it leaves something to be desired from the practical point of view. For example, Ghezzi and Jazayeri go on to illustrate that Pascal is not strongly typed and that ALGOL 68 is. They discuss several problems with Pascal, such as variant record usage and formal procedure parameters, which ALGOL 68 avoids by better design. But then they get to subranges and array indexing, and they point out that ALGOL 68 does not have a problem with ranges because the bounds of an array are considered to be part of the value, not part of the type. Well, OK. That is an interesting idea from the language designer's point of view, but to the programmer nothing has changed -- out of bounds indices are still wrong, and still require a run-time check. Who cares if it's a type checking question or a value checking question? To many people, strong typing means that (a) there is a wide variety of types, (b) there are few automatic coercions between types, (c) things that are not immediately compatible nor coercible are flagged as wrong, and (d) most of the flagging is done at compile time. This is not a precise definition, but it more accurately reflects what the programmer needs. Jon Mauney, mcnc!ncsu!mauney North Carolina State University