This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Warnings for unhandled c++ exceptions?
- From: Mark Mielke <mark at mark dot mielke dot cc>
- To: "Wesley W. Terpstra" <terpstra at ito dot tu-darmstadt dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 3 Feb 2003 14:21:41 -0500
- Subject: Re: Warnings for unhandled c++ exceptions?
- References: <20030203131345.GA25136@ito.tu-darmstadt.de>
On Mon, Feb 03, 2003 at 02:13:45PM +0100, Wesley W. Terpstra wrote:
> I find this feature of Java remarkably useful as it helps to detect sloppy
> exception handling, which is brutal to find in C++. I do not desire to
> change the C++ language much; I like it just how it is, but I think an
> optional warning would be useful during development under g++.
Even in Java, they recognized that sometimes, this ability, is more trouble
than it is worth. Consider sub classes of java.lang.RuntimeException.
I don't think there is a 'right' answer to this problem. Java leans towards
one side, while C++ leans towards the other side. It seems wrong to me to
encourage C++ users to lean the wrong way by presenting them with a 'Java'
style warning. C++ users need to be familiar with C++ practices. If they
are not, they will never excel at C++.
I would be against such a warning message. It is cute, but impractical.
mark
--
mark@mielke.cc/markm@ncf.ca/markm@nortelnetworks.com __________________________
. . _ ._ . . .__ . . ._. .__ . . . .__ | Neighbourhood Coder
|\/| |_| |_| |/ |_ |\/| | |_ | |/ |_ |
| | | | | \ | \ |__ . | | .|. |__ |__ | \ |__ | Ottawa, Ontario, Canada
One ring to rule them all, one ring to find them, one ring to bring them all
and in the darkness bind them...
http://mark.mielke.cc/