From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3529 invoked by alias); 3 Feb 2003 19:13:31 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 3360 invoked from network); 3 Feb 2003 19:13:31 -0000 Received: from unknown (HELO mark.mielke.cc) (216.209.85.42) by 172.16.49.205 with SMTP; 3 Feb 2003 19:13:31 -0000 Received: from mark.mielke.cc (localhost.localdomain [127.0.0.1]) by mark.mielke.cc (8.12.5/8.12.5) with ESMTP id h13JLfDn031430; Mon, 3 Feb 2003 14:21:41 -0500 Received: (from mark@localhost) by mark.mielke.cc (8.12.5/8.12.5/Submit) id h13JLfCG031428; Mon, 3 Feb 2003 14:21:41 -0500 Date: Mon, 03 Feb 2003 19:13:00 -0000 From: Mark Mielke To: "Wesley W. Terpstra" Cc: gcc@gcc.gnu.org Subject: Re: Warnings for unhandled c++ exceptions? Message-ID: <20030203192141.GA31316@mark.mielke.cc> References: <20030203131345.GA25136@ito.tu-darmstadt.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030203131345.GA25136@ito.tu-darmstadt.de> User-Agent: Mutt/1.4i X-SW-Source: 2003-02/txt/msg00104.txt.bz2 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/