std::map replacement

  • Thread starter Christopher Benson-Manica
  • Start date
D

Derek

I'd rather not think what my 747 autopilot will do when
If you don't trust the author of the software to handle
bad_alloc correctly why do you trust him to handle a null
pointer correctly?

I don't. Whether an exception goes uncaught or a null
pointer is misused, my point is that C++ might not be
the best language for some extremely mission critical
applications.
 
J

Jeff Flinn

Derek said:
I don't. Whether an exception goes uncaught or a null
pointer is misused, my point is that C++ might not be
the best language for some extremely mission critical
applications.

As opposed to what other language?

Jeff F
 
D

Default User

Derek said:
I share your concerns, but the only Boost component
mentioned in this thread was boost::shared_ptr. Even
though my employer does not allow Boost in general, we
do use shared_ptr because (a) it's safer than the smart
pointers we wrote in house, (b) it's very portable, and
(c) it's very likely to be in the next standard.

I'm sure that Boost components could be pulled out and qualified.
However, as I've said, their status is at this time that of third-party
libraries.
Of course if your application is so critical that it "makes
planes fly and stuff," then Boost may not be appropriate.
In fact, I'm not sure C++ is entirely appropriate in such
circumstances, unless used as a limited subset of the full
language. I'd rather not think what my 747 autopilot will
do when 'new' throws std::bad_alloc. ;)

Exceptions are disabled, plus we do almost all allocations during
initialization. Other than that, pretty much everything is included. We
run under a distributed real-time operating system (current VxWorks). We
use CORBA (ACE/TAO) as our middleware.




Brian Rodenborn
 
D

Derek

I don't. Whether an exception goes uncaught or a null
As opposed to what other language?

Beats me, but I know critical software was being written
long before C++ appeared on the scene. A lot of safety
critical systems have been written in Ada over the years.
(Incidentally, Boeing uses Ada to keep 747's in the sky,
which ties in nicely with my original autopilot example.)
 
P

Pete Becker

Derek said:
I don't. Whether an exception goes uncaught or a null
pointer is misused, my point is that C++ might not be
the best language for some extremely mission critical
applications.

So your comment about exceptions was just a cheap shot at C++. Thanks
for making your position clear.
 
D

Derek

I'd rather not think what my 747 autopilot will do
So your comment about exceptions was just a cheap shot at
C++. Thanks for making your position clear.

I don't understand how an off-hand joke becomes a
"position," but call it what you wish. I meant no offense
to the C++ community. I have been a C++ developer for
years and I will continue to use C++ whenever I can.
However, I am also aware that C++ gives me a lot of rope to
hang, and writing air-tight code can sometimes be tricky.
So if you asked me to write software tomorrow that lives
will depend on, I would think long and hard before adoping
C++, despite my bias toward it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top