From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_05,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4c9c0d8b1c5d62a4,start X-Google-Attributes: gid103376,public From: "W. Wesley Groleau (Wes)" Subject: Re: What's wrong with OO? Date: 1996/12/05 Message-ID: <9612051624.AA08888@most>#1/1 X-Deja-AN: 202520015 sender: Ada programming language comments: Gated by NETNEWS@AUVM.AMERICAN.EDU mailer: Elm [revision: 70.85] processor" at dec 5, 96 9: 21 am newsgroups: comp.lang.ada Date: 1996-12-05T00:00:00+00:00 List-Id: :> OO? It seems like taking a look at Picasso's after having a look at modern :> arts. It sounds like listening to pop/rock after listening to classical. One of the benefits of OO is its ability to model the so-called "real world" :> computers do. Understanding and applying OO need a different approach. People :> have to think and response in abstract. Yes, Rumbough mentioned this in his Two of the things "wrong with OO" are equally wrong with many other aspects of software. 1. Many people are unable to think abstractly. 2. Many people are extremists. An example of (1) is the person who recently posted a long diatribe against "OO-speak gurus" and any one else who dares to suggest that computers and programming might have a trace of similarity to anything else. This person is the sort who can tell the difference between one forest and another by showing the uniqueness of each tree. I exaggerated for effect--few people go to that extreme, but I have had to clean up after coders who were unable to see the similaries between alphabetizing strings and putting numbers in ascending order. We do not merely double the amount of code, we sometimes have extra code just to exclude variations of the general case that weren't specifically listed in the requirements spec. (And part of the blame goes to people who instead of being perfectly clear in specifying the intended general case, think they have to list every specific variation they can remember.) Examples of (2) include (but are not limited to): "OO-speak gurus" who instead of using OO methods to make code more understandable, preach "pure OO" such as - An Object NEVER does anything to another Object. It can only send a message requesting the other object to change state. (This is NOT modeling the real world. A dog occasionally will eat food. It does not send message "Be full" to its stomach and message "Be less full" to the food dish. But go ahead and blast the dog for "thinking procedurally" !) language fanatics who think a feature has to be used "because it's there" - Recursion is good, therefore it must be used even when iteration is easier to read. - Discriminants are good. Let's use them to let us encapsulate unrelated things into the same record type. - Generics are good. One generic with forty lines of formal parameters is better than two non-generics with five lines of code each. - FORTH is good. Therefore Postfix is good. Therefore the traditional assembler syntax of opcode before operand is bad. - (from some C programmers) Always do all the work inside the loop control line. The body of the loop should do as little as possible. people who will spend hours optimizing a four-line routine that gets called only if Santa goes down a particular chimney on February 29th. people who kill more than one sacred cow in the same post. :-) --------------------------------------------------------------------------- W. Wesley Groleau (Wes) Office: 219-429-4923 Hughes Defense Communications (MS 10-40) Home: 219-471-7206 Fort Wayne, IN 46808 (Unix): wwgrol@pseserv3.fw.hac.com ---------------------------------------------------------------------------