Path: utzoo!attcan!uunet!know!zaphod.mps.ohio-state.edu!ncar!noao!arizona!gudeman From: gudeman@cs.arizona.edu (David Gudeman) Newsgroups: comp.lang.misc Subject: Re: Need reference for "firewall" modularization Message-ID: <26865@megaron.cs.arizona.edu> Date: 26 Oct 90 19:06:09 GMT Organization: U of Arizona CS Dept, Tucson Lines: 37 In article <961@skye.cs.ed.ac.uk> nick@cs.edinburgh.ac.uk (Nick Rothwell) writes: ]In article <1990Oct25.193935.375@arnor.uucp>, strom@arnor.uucp writes: ]> many program bugs are the result of issuing otherwise correct operations ]> *in the wrong order* ]Just a minor point here - that's a fault with conventional procedural ]languages with assignable variables, and nothing to do with typechecking. ]Functional and logic languages don't have this problem at all. First, some functional languages and the only well-known logic language (Prolog) certainly _do_ have this problem. If you do things in the wrong order, you may get peculiar results like non-termination. Second, the implication that this would show some sort of superiority for non-procedural languages is just wrong. I could just as well say "most problems in functional programs are caused by composing the right functions in the wrong ways -- procedural languages don't have this problem since you can't compose functions." or "most problems in logic languages are caused by unifying otherwise correct terms with the wrong variables -- procedural languages don't have this problem since they don't have unification". Basically someone screwed-up somewhere, and changing the paradigm just changes the nature of the screw-ups, not the quantity or the quality. This is not to say that changing the language itself can't reduce errors, just that there is no reason to assume that functional or logic languages by the fact of being function-based or predicate logic-based reduce errors. To be sure, functional and logic languages tend to be higher-level than procedural languages, and higher-level languages seem to reduce errors, but this matter of semantic level is independent of whether the language is based on functions, predicates, procedures, or some combination of the above. -- David Gudeman Department of Computer Science The University of Arizona gudeman@cs.arizona.edu Tucson, AZ 85721 noao!arizona!gudeman