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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e5eb8ca5dcea2827 X-Google-Attributes: gid103376,public From: Samuel Mize Subject: Re: Ada OO Mechanism Date: 1999/05/27 Message-ID: <7iid7g$2afk@news2.newsguy.com>#1/1 X-Deja-AN: 482580206 References: <7i05aq$rgl$1@news.orbitworld.net> <7i17gj$1u1k@news2.newsguy.com> <7icgkg$k4q$1@nnrp1.deja.com> <3749E9EC.2842436A@aasaa.ofe.org> <7id2eo$fag@drn.newsguy.com> <3749FF7D.F17CE16A@aasaa.ofe.org> <374AC676.F7AE0772@lmco.com> <7ieuja$5v9@news1.newsguy.com> <7if7oj$bee@news1.newsguy.com> <7ifem0$1b4p@drn.newsguy.com> Organization: ImagiNet Communications, Ltd. User-Agent: tin/pre-1.4-981002 ("Phobia") (UNIX) (AIX/3-2) Newsgroups: comp.lang.ada Date: 1999-05-27T00:00:00+00:00 List-Id: Chris wrote: > In article <7if7oj$bee@news1.newsguy.com>, Samuel says... >> >>I do know that this distinction is extremely useful in a mixed-method >>environment, e.g., object-oriented and procedural elements working >>together. >> > > I don't think it leads to clear design when one part of the > program is done in OO ways, while another part is not. > > one either uses all OO, or all procedural. > > don't you agree? Nope. But then I've worked on very large systems, with multiple fairly independent subsystems interacting inside the language. For instance, we had an object-oriented design which needed object persistence -- that is, many objects stored their attributes between executions of the system, re-reading their current state at start-up. The repository for these objects was really just a simple data base in this design, and when we tried to switch it to an object-oriented implementation it was much less clear, less maintainable, and slower. Another example would be a process control system that interacts with things like inventory control and materials routing. I could easily imagine that you would want to implement safety-critical control loops in a very controlled procedural fashion -- in this area, you are inherently thinking about actions more than objects anyway. Then you could interface this to an object-oriented representation of the physical objects being manipulated. In short, I've worked in mixed-method environments, and as long as you clearly define where each method is going to be used, it's quite useful and powerful. At SOME point you stop doing OO work and switch to a procedural model, at least when implementing a class's method bodies. Unless, of course, you're coding in something like Smalltalk that is object-oriented all the way down to integers (I understand). I don't think you'll sell the argument that this is necessary, or even clearer to most people than procedurally-coded methods. Best, Sam Mize -- Samuel Mize -- smize@imagin.net (home email) -- Team Ada Fight Spam: see http://www.cauce.org/ \\\ Smert Spamonam