"jonathan harley" <jonathan.harley@canrem.uucp> (06/30/91)
JS>The difference, as I pointed out at the start of this thread-within-a- JS>thread, is that in SOME languages the language designer is kind enough JS>to supply the programmer with LANGUAGE constructs that directly support JS>good coding style, and in others the onus is on the programmer. Jim: The onus of good programming style is ALWAYS on the programmer, regardless of the language... Jonathan Harley Consultant Toronto, Ontario (aka jonathan.harley@canrem.uucp) --- ? DeLuxe?/386 1.12 #7430 ? Have you been VAXinated? -- Canada Remote Systems. Toronto, Ontario NorthAmeriNet Host
jls@netcom.COM (Jim Showalter) (07/01/91)
jonathan.harley@canrem.uucp (jonathan harley) writes: >The onus of good programming style is ALWAYS on the programmer, regardless >of the language... 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. 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. 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. 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. 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). -- *** LIMITLESS SOFTWARE, Inc: Jim Showalter, jls@netcom.com, (408) 243-0630 **** *Proven solutions to software problems. Consulting and training on all aspects* *of software development. Management/process/methodology. Architecture/design/* *reuse. Quality/productivity. Risk reduction. EFFECTIVE OO usage. Ada/C++. *
rockwell@socrates.umd.edu (Raul Rockwell) (07/01/91)
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 <rockwell@socrates.umd.edu>
jls@netcom.COM (Jim Showalter) (07/01/91)
rockwell@socrates.umd.edu (Raul Rockwell) writes:
]>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?
Well, not really. There are a host of other things that A has the B
does not that are all intended to increase readability. The two you
list are just a small subset.
]>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, ...
Well, first of all, this would then yield a program written in language
B. ;-)
Secondly, if you have to go through that much effort to de-readability-ize
language A, then you are basically arguing FOR my claim that it takes
work to write badly in A.
--
*** LIMITLESS SOFTWARE, Inc: Jim Showalter, jls@netcom.com, (408) 243-0630 ****
*Proven solutions to software problems. Consulting and training on all aspects*
*of software development. Management/process/methodology. Architecture/design/*
*reuse. Quality/productivity. Risk reduction. EFFECTIVE OO usage. Ada/C++. *