Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site kobold.UUCP Path: utzoo!linus!security!genrad!grkermit!masscomp!kobold!tjt From: tjt@kobold.UUCP Newsgroups: net.lang Subject: Re: 'lint' and strong typing - (nf) Message-ID: <259@kobold.UUCP> Date: Mon, 23-Jan-84 22:00:59 EST Article-I.D.: kobold.259 Posted: Mon Jan 23 22:00:59 1984 Date-Received: Fri, 27-Jan-84 06:52:36 EST References: <1376@pur-ee.UUCP>, <254@kobold.UUCP> <857@proper.UUCP> Organization: Masscomp, Westford, MA Lines: 54 > From: gam@proper.UUCP, Organization: Proper UNIX, San Leandro, CA > This is beginning to sound more like a problem of programmers' behavior > than of any type-checking mechanism we might come up with. I think > we should view this sort of type-checking as part of the programmer's > job of creating `correct' code. If you want to view type-checking as part of the programmer's job, why not include translating the program to assembly language or machine language as part of the job also? Many of the early entries in "Collected Algorithms from the ACM" use Algol 60 as a specification language and state that the algorithm was verified by being translated to Fortran or machine language. I would hope you would agree that modern computer languages are more useful as *programming* languages than as *specification* languages. The distinction I would use is that in a specification language there is no machine-verified correspondence between the program and what is executed by the computer, while there is such a correspondence created by the compiler for a programming language. > If a programmer is not going to use the tools at his/her disposal to > avoid such problems, I don't think that should be accepted as a `style' > but sheer laziness/incompetence. Laziness? Definitely! Incompetence? Perhaps. The basic premise of a high-level language is that a programmer is lazy and incompetent. Anybody capable of writing a program in a high level language is capable of being taught how to write or translate that program in machine language. Most people are too lazy perform that translation and are have great difficulty doing so without errors. Similarly, strong type checking is nothing that cannot be done by the programmer, by hand. Again, most programmers are too lazy to do this checking by hand, and will generally make errors when doing so. Actually, in most programming environments the programmer *does* do this type checking by hand when he writes the program, and *does* make errors. A system in which the programmer does *no* preliminary type checking would be some sort of language specific editor that prompts the programmer for arguments/operands/whatever and indicates acceptable data types. Anyway, if you believe that strong type-checking is a valuable tool, you should be willing to make it a standard part of your compiler so that a programmer will not be able to give in to his natural (and valuable) inclination to be lazy: If programmers weren't lazy, we'd still be writing in machine language (or programming Turing machines). -- Tom Teixeira, Massachusetts Computer Corporation. Westford MA ...!{ihnp4,harpo,decvax}!masscomp!tjt (617) 692-6200 x275