Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!ames!haven.umd.edu!socrates.umd.edu!socrates!rockwell From: rockwell@socrates.umd.edu (Raul Rockwell) Newsgroups: comp.object Subject: Re: named parameters and Message-ID: Date: 30 Jun 91 20:36:50 GMT References: <1991Jun30.1034.2615@canrem.uucp> <1991Jun30.174120.17703@netcom.COM> Sender: rockwell@socrates.umd.edu (Raul Rockwell) Distribution: comp Organization: Traveller Lines: 48 In-Reply-To: jls@netcom.COM's message of 30 Jun 91 17: 41:20 GMT Jim Showalter: Suppose I have two languages, A and B. A is designed to be as readable as possible, with ample syntactic sugar, built-in constructs to support things that are readable (such as enumeration types, named parameters, etc). Language B has none of this. How about if we say A is a language which has enumeration types and named parameters, and B is a language which does not? Would that be sufficient? Now, I challenge a programmer to 1) write code as readably as possible in both languages and 2) write code as un-readably as possible in both languages. How about if I write a little piece of code to transfore the code from (1) into an unreadable mess? Let's see, it would strip comments, reduce all whitespace to a whatever is minimal for the language, and rename all definable tokens to a form like A0001, A0002, A0003, ... My claim--and it never seemed like something anybody would argue about--is that the effort required to accomplish #1 in language B is much higher than in language A, and that the effort required to accomplish #2 in language A is much higher than in language B. Well, perhaps. Any language with variables can provide the functionality of enumeration types. Named parameters are even more a matter of style. [You might just as well argue that if your program requires named parameters to be intelligible the program is poorly designed.] In the #1 case, I need to work hard to provide workarounds for all the readability support missing from language B and provided free of charge in language A. Not at all. It might actually be simpler to deal with enumeration or named parameters using language B than it is with language A. Language B may provide methods for dealing with structured data, for example, which are superior to language A's methods. In the #2 case, I need to work hard to work around all the readability support present in language A (I need, for example, to diligently NOT use enumeration types, named parameters, etc). Not at all. Just use my meaning mangler (described above). And if that's inadequate, well, just run it through a compiler.... -- Raul