Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!hplabs!hp-pcd!hplsla!jima From: jima@hplsla.HP.COM ( Jim Adcock) Newsgroups: comp.lang.c++ Subject: Re: Hey Bjarne! Some Questions Message-ID: <6590017@hplsla.HP.COM> Date: 17 Feb 88 00:23:51 GMT References: <1271@devvax.JPL.NASA.GOV> Organization: HP Lake Stevens, WA Lines: 73 OK, here's some comments per your requestsz; 1) Exception Handling in C++ I consider this an interesting topic. I've heard several authors claim they have ways of doing this, but I've yet to get my hands on a paper. So far the only big weaknesses I've been able to find in trying to apply C++ to "real world" problems [as oppose to acedemic research, G-Jobs, etc] are 1) lack of try/recover 2) incomplete set of tools [debuggers, profilers ....] due to the relative immaturity of the language 3) memory management of SOME parculiar objects, but maybe multiple inheritence can solve these problems. 2) OO Design Tools a) Are there any? b) What should such tools be like? From MY point of view the biggest step forward in the "Design Tools" area is the arrival of a language that will allow me satisfactory expression of my design in pretty much the form I conceive it. And when written have the design execute in a reasonable amount of time, WITHOUT having to hack on the underlying machine representation of the language. A GREAT compiler for a GREAT language represents the BIGGEST win in this area as far as I'm concerned. 3) The problem with (single) inheritance: Change the objects .vs. change the tools. I view C++ as primarily a tool-making tool, where most of the tools are going to be expressed in the form of C++ Classes. Then, when you have the full set of tools [C++ classes] built up necessary to do YOUR job, your job becomes relatively easy, because you have the tools necessary to do your job. At least for the kind of stuff I need to do C++ is a VERY GOOD tool-making tool. The times that my software-programming-life has become VERY difficult has been when someone CLAIMS to have a complete set of tools to do MY job, and then forces me to use those tools .... I would be VERY wary of anyone who claims to have all tools necessary to do YOUR job, and asks you to relinquish control over making the fundamental tools necesary to do YOUR job. I view multiple inheritence as a two edged sword. I am anxiously awaiting this feature in [released versions] of C++ because 1) I believe many classes are very similar except for small pieces that need to be spliced in or out. Choice of memory management scheme is one example I believe might need to be spliced in/out of many C++ classes. 2) I believe there is a need to "glue" together a variety of fundamental, "simple", -- but hard to get "perfect" capabilities. For example, maybe there is a need to glue linked-list capabilities onto an existing class. Sure I can come up with a linked-list capability -- but couldn't it be possible that I might be able to pick a better capability off the shelf? [In any case, the ultimate decision of which approach to take would be MINE] The other edge of the sword is that I am VERY nervous about how my COMPATRIOTS might missuse this feature :V) 4) Complex Algorithms | Object oriented design maps well into problem domains with a large number | of complex objects, but where the algorithm describing the interactions | of objects is simple. For example, say you are simulating a football team. | The players are naturally identified as objects. But what about the game | plan? This plan is very complex. How is the plan itself broken down into | objects, given the possibly extensive context dependancies of various | options within the game plan? "Pass if this and that and the other...." I DO believe that C++ would probably be missused if it was used for A.I. -type applications like your "football game" appears to be. [Then again, how important are "REALLY COMPLICATED" solutions to the real world? I tend to believe simple, well thought out solutions make a bigger contribution to the real world ... but enuf philosophy..] For this stuff use an A.I. language like Lisp. Unfortunately, Lisp is looking kindof dated from this not-much-Lisp user's eyes. It might be nice if you could mix-and-match capabilities from C++ and Lisp cleanly ..... Unfortunately I think using Lisp is going to require a LARGE runtime support, isn't it ???