Re: C++ vs. C#

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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.


.



Relevant Pages

  • Re: [semi OT] - Lack of long double implementation in VS
    ... you'll have to ask Redmond. ... for Windows, none of which supported an extended float format (or were ... compilers did support 80 bit long doubles. ...
    (comp.lang.c)
  • Re: Hello world console program with lcc-win32
    ... The Windows port of Seed7 with MinGW (and other compilers) uses: ... Can be done with the windows API ... How do you support Unicode? ... For Seed7 I decided to use this way. ...
    (comp.lang.c)
  • Re: looking for compilers and/or platforms **without** C++ exception support
    ... standard /does/ use exceptions. ... Any compiler that doesn't support them isn't C++ ... Non-C++ compilers don't support ... is that all modern compilers on desktop platforms do support exceptions, ...
    (comp.lang.cpp)
  • Re: builtin lists and Intel SSE support?
    ... >> 1) runs on Windows ... I don't know about the SSE support, ... > compilers include some way to tinker with/extend the compiler and any ... writing custom patches really doesn't fulfil the criteria. ...
    (comp.lang.lisp)
  • Re: parallel fortran
    ... threaded parallel operation, there are tools such as IntelThread Checker. ... I doubt I would do this again for a project which will never run anything but 32-bit Windows. ... the Open Watcom compilers do not support OpenMP ...
    (comp.lang.fortran)