Re: C++ vs. C#
- From: Daniel James <wastebasket@xxxxxxxxxxxxxxxx>
- Date: Sun, 19 Apr 2009 15:19:27 +0100
In article news:<o5rku41a9odfsn10l7aenenl5bjcm1f02q@xxxxxxx>, Joseph M.
Newcomer wrote:
TRY/CATCH was required because exception handling wasn't really done
right in the early C++ compilers.
It was "done right" in all the compilers I used that supported it at
all, but early C++ compilers -- including the 16-bit Microsoft compiler
-- didn't support exceptions at all.
The C++ language described in the first edition of Stroustrup's "The C++
Programming Language" in 1986 did not support exceptions at all. I first
became aware of the proposal to add exceptions to the language from "The
C++ Annotated Reference Manual" (Stroustrup and Ellis, 1990), and they
were described as a standard part of the language in the second edition
of C++PL in 1991 but with a footnote saying that "at the time of writing
they are not widely available".
It is not clear that the choice of using CException* instead of
CException was coupled into this directly or not. Too many years
ago for me to remember.
Yes it was. In real C++ Exception handling an exception object is
usually created automatically at the point of the throw statement and
destroyed automatically at the final catch (where it is caught and not
re-thrown). In 16-bit VC++ there was no support for this, so the THROW
macro created a CException object on heap and it was deleted by one of
the macros making up the CATCH block (END_CATCH? I no longer recall).
So if you think you don't like Windows, remember that the alternative
is far worse.
I don't think I don't like Windows ... it's mostly quite good, but I
KNOW that there are some things about Windows that I really don't like
at all.
Yes, other systems have faults too, but the horror stories you relate
are all from twenty years or so ago ... Windows has improved
immeasurably in that time, but so have other systems. You might find
that they aren't as bad now as you recall.
Cheers,
Daniel.
.
- Follow-Ups:
- Re: C++ vs. C#
- From: Joseph M . Newcomer
- Re: C++ vs. C#
- References:
- RE: C++ vs. C#
- From: Electronic75
- Re: C++ vs. C#
- From: Ajay
- Re: C++ vs. C#
- From: Daniel James
- Re: C++ vs. C#
- From: Ajay
- Re: C++ vs. C#
- From: Giovanni Dicanio
- Re: C++ vs. C#
- From: Ajay
- Re: C++ vs. C#
- From: Daniel James
- Re: C++ vs. C#
- From: Giovanni Dicanio
- Re: C++ vs. C#
- From: r norman
- Re: C++ vs. C#
- From: Joseph M . Newcomer
- RE: C++ vs. C#
- Prev by Date: Re: C++ vs. C#
- Next by Date: Re: C++ vs. C#
- Previous by thread: Re: C++ vs. C#
- Next by thread: Re: C++ vs. C#
- Index(es):
Relevant Pages
|