home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++,bnr.lang.c++
- Path: sparky!uunet!portal!ntmtv!corpgate!brtph560!bnr.ca!kimmyd
- From: kimmyd@bnr.ca (Kimmy Posey P920)
- Subject: Re: Criticisms wanted
- Message-ID: <1992Nov11.231738.16349@brtph560.bnr.ca>
- Sender: news@brtph560.bnr.ca (Usenet News)
- Organization: Bell-Northern Research, BNR-RTP
- References: <1d87ooINN10l@bHARs12c.bnr.co.uk>
- Distribution: bnr
- Date: Wed, 11 Nov 1992 23:17:38 GMT
- Lines: 64
-
- In article <1d87ooINN10l@bHARs12c.bnr.co.uk>, dsr@bnr.co.uk (D.S.Riches) writes:
- |> ... not personal ones, although I'm sure I can get them anytime :-)
- |>
- |> My project is at a stage where a choice between C or C++ for the
- |> implementation language is required. Most favour C++, however there
- |> are some who are adamant that C++ is the wrong thing to use. The main
- |> problem is that they are not sure why!!
- |>
- |> Now, I've seen many pro's for the use of C++ but not really any for the
- |> cons of C++. What I'd like is a set of reasons why C++ shouldn't be
- |> used. Preferably, I want ones which are just C++ specific and not ones
- |> that can also be applied to C as well. There is no other language to
- |> be considered and so I'm not interested in suggestions for going to
- |> another language.
- |>
- |> The type of project we're working on is Real Time Communications. Now,
- |> some of the things we have to consider are; reliability, performance,
- |> determinism.
- |>
- |> I've seen Ian Joyner's critique of C++ and the responses to that but
- |> I'd like to know about other issues such as; is C++ easier to test than
- |> C, is it possible to determine which object is invoked before another
- |> object and so on.
- |>
- |> Thanks in advance for any help,
- |>
- |> Dave
- |>
- |>
- |> Dave Riches
- |> Email: David.S.Riches@bnr.co.uk
- |> Smail: BNR Europe Ltd, London Road,
- |> Harlow, Essex. CM17 9NA. England
- |> Phone: +44 (0)279-402496
- |> Fax: +44 (0)279-451434
-
- I have faced the same questions in recent months and I think I have some
- insight for you. First of all there is really is no choice here at BNR of
- what language to use when implementing an object-oriented design. No other
- language having OO constructs is available (protel-2 is not here yet) with
- acceptable real-time performance other than C++. If your doin' Embedded
- Systems (which is what we make money doing) then this is a paramount concern.
- The good news is that the poor C++ real-time performance myth is just that.
- A myth. I can give ya a guy in Texas that pumps real-time SONAR data through
- systolic arrays of DSPs and all his code is OO C++. There is SOME real-time
- degradation but think about it. Virtual functions get called through arrays
- of functions. You do that all the time in 'C' anyway! Second you need to
- look at your design. If your doin' the same old procedural crap, use 'C'.
- If you intend to live in the present then do an OO design and use C++. Or
- implement your OO design in 'C'. It can be done but the language doesn't
- force it on ya. Neither does C++ for that matter. C++ inherits the same
- anarchist tendencies that 'C' has. But it does give you the ability to
- create abstract data type and build inhertance relationships and stuff.
- Finally, what you really need to spend time on (if you decide on OO) is
- designing your object model. This is the heart of any OO design. I am in
- the early phases of my first OO design but I have spent mucho time talking
- to people who have used the technique in the real world and all of them say
- that the object model is god of the design. Keep it shallow and wide and
- you should be ok.
-
- I'm glad to see others in BNR looking into the OO paradym. It is my opinion
- that we will either embrace it or die as a company.
-
- KimmyD
-