Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site sdcsvax.UUCP Path: utzoo!linus!security!genrad!decvax!ittvax!dcdwest!sdcsvax!davidson From: davidson@sdcsvax.UUCP Newsgroups: net.lang Subject: Re: Anti-CLU... Anti-Strong-Typing... Message-ID: <70@sdcsvax.UUCP> Date: Tue, 6-Dec-83 20:12:51 EST Article-I.D.: sdcsvax.70 Posted: Tue Dec 6 20:12:51 1983 Date-Received: Fri, 9-Dec-83 03:31:45 EST References: <4211@umcp-cs.UUCP> Organization: EECS Dept., U.C. San Diego Lines: 56 Computer languages are a religious issue primarily because different languages can offer their programmers wildly differing views on the nature of programming. Let me give some examples. FALLACY: People who come from the mainstream, where types are associated with variables, think that languages like LISP and Smalltalk, where types are associated with objects, do not allow correctness checks at compile time. They also think that the meaning of ``types associated with variables'' means that a type tag is necessarily present at runtime. FACT: Correctness proofs were first done in LISP, and continue to be done. LISPs elegant semantics makes them much easier than in, say, Pascal. Implementations of functional languages often use runtime data tags to allow for easier debugging and generic operators. However, these tags correspond to a few primitive datatypes, not to the abstract datatypes in the mind of the programmer. Abstract datatypes are a metalinguistic concept used in program design and verification. (I remember back in the mid-70s how people kept thinking that Pascal's datatypes involved runtime overhead.) Similarly, while Smalltalk objects have class tags, these tags also do not necessarily correspond to the programmer's idea of their abstract datatype. WARNINGS: 1. The term object, as used in functional language terminology, is quite different from the term as used in object oriented language terminology. 2. The term functional language as used by LISP folks, is quite different from the term as used by folks like John Backus who study what THEY call functional programming. The latter bunch refer to LISP as an object oriented language (and not as a complement). 3. Correctness proofs are done with quite different methodologies and take quite different forms in different languages. For example, in Pascal, one proves assertions about the contents of variables. In LISP, one proves assertions about the result of a function as a function of its arguments. In FP, one manipulates the program algebraically until one arrives at an identity. In PROLOG, programs are their own correctness proofs (PROLOG programs have both a declarative and a procedural semantics). NOTE: By ``at compile time'', you should understand: ``from the text, independent of any particular run with any particular dataset''. Many languages are not always compiled in the conventional sense. As a language buff who can't resist learning new languages whenever possible (especially if they are in a new family), I have come to the conclusion that it is impossible to usefully criticise a language until you've not only learned it, but have immersed yourself in its worldview. Time and again, I've learned a new language, used it successfully, then discovered I didn't know it at all. Therefore, my advice to people who would criticise languages on any other basis, is DON'T. -Greg