Free Republic
Browse · Search
News/Activism
Topics · Post Article

To: khelus

I think we’re of the same vintage and we agree more than we disagree.

The one central problem I see in many of these huge systems written in C++ is that C++ tries to be all things to every coder, giving tools and paradigms to do literally everything.

When it was just “C with classes” in the late 80’s, it was OK. I have no problem with more modest OOP C implementations, eg, Objective-C and the like, where they try to be more modest and firm in their goals.

But C++? Holy crap. The excuse and reason given by management for not going to Ada-83 in the 80’s was that “Ada is too complex in the wrong areas - we don’t have as much as we need in the area of hardware interface in Ada...”

The excuses I’ve heard for not going to Ada-95, which fixed most of those issues, was that “Ada-95 is too complex.”

Then along comes C++, which is more complex than any other programming language I’ve seen (and I’ve programmed in more than a dozen languages, from assembly to Common Lisp, Smalltalk-80, etc) and management swallows all their Ada excuses and jumps on the bandwagon... because they don’t want to have to train Ada coders in-house.

Morons.

Now, as far as error rates:

The two projects I know of that have error rates one-tenth or lower of the common industry error rates are the Shuttle orbiter and ground system code (not written in C or C++) and the Boeing 777 FMS (written in Ada). The way they both achieved their low error rates was intensive requirements tracking, walk-throughs of design, code walk-throughs, change management, etc. Nothing that wouldn’t work today in any other language.

Trouble is, the C++ shops I’ve seen all leave that behind. They’re all about buying lots of flashing-screen tools and IDE’s, class libraries and pumping out the code.

One of my biggest beefs with C++ is that they mix two huge paradigms into one language: programming by template and programming by classes. I believe that a language should pick on and do it well. Then there’s the lack of native memory management in C++, which I find inexcusable. One of the best reasons I know of to skip C++ and go straight to Java (or similar) languages is that the typical newb programmers are horrid at managing dynamic memory allocation/returns, leading to leaks that remind one of the Titanic.

Google’s Chrome browser and Firefox both have their roots in C++ and they have memory leaks that require I restart them frequently.


33 posted on 04/02/2012 12:07:44 PM PDT by NVDave
[ Post Reply | Private Reply | To 30 | View Replies ]


To: NVDave

Believe me, Newb programmers will find ways to create memory leaks in Java.


34 posted on 04/02/2012 12:13:42 PM PDT by dfwgator (Don't wake up in a roadside ditch. Get rid of Romney.)
[ Post Reply | Private Reply | To 33 | View Replies ]

To: NVDave
... The way they both achieved their low error rates was intensive requirements tracking, walk-throughs of design, code walk-throughs, change management, etc. Nothing that wouldn’t work today in any other language.
Trouble is, the C++ shops I’ve seen all leave that behind. ...


Thanks for your reply. It explains a lot. In essence management has exchanged sturdy, well coded, well tested, easy to maintain for doing things fast and dirty and flashy on the cheap.

... Google’s Chrome browser and Firefox both have their roots in C++ and they have memory leaks that require I restart them frequently.

Thanks for this tidbit. It verifies what I have suspected about Firefox.
37 posted on 04/02/2012 1:16:34 PM PDT by khelus
[ Post Reply | Private Reply | To 33 | View Replies ]

Free Republic
Browse · Search
News/Activism
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson