From owner-freebsd-chat Wed Mar 6 19: 2: 3 2002 Delivered-To: freebsd-chat@freebsd.org Received: from chiark.greenend.org.uk (chiark.greenend.org.uk [212.22.195.2]) by hub.freebsd.org (Postfix) with ESMTP id 30A0B37B400 for ; Wed, 6 Mar 2002 19:01:51 -0800 (PST) Received: from fanf by chiark.greenend.org.uk with local (Exim 3.12 #1) id 16io9u-0006R8-00 (Debian); Thu, 07 Mar 2002 03:01:34 +0000 Date: Thu, 7 Mar 2002 03:01:34 +0000 From: Tony Finch To: Raymond Wiker Cc: Nate Williams , Giorgos Keramidas , Terry Lambert , "Steve B." , freebsd-chat@FreeBSD.ORG Subject: Re: C vs C++ Message-ID: <20020307030134.B19669@chiark.greenend.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <15494.22039.581536.624619@raw.grenland.fast.no> Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Raymond Wiker wrote: > > > Exceptions are great, but there are too many gotchas because the > > behavior is not standardizes well enough to depend on them. (And, if > > you're not careful, you can cause yourself *all* sorts of problems using > > them.) > > I'd *really* like an example of this. The only serious >argument I've heard about exceptions in the last couple of years is >that they are inefficient, and even that is not a valid argument for >avoiding them completely. Error handling in general is difficult when you have to clean up partially-completed operations, and although C++ helps a lot by giving you automatic destructors, there are still times when the whole idea gives me the heebie-jeebies. What happens when an automatic destructor throws an exception when the stack is being unwound in the course of handling an exception? Tony. -- f.a.n.finch VIKING NORTH UTSIRE SOUTH UTSIRE: NORTHWESTERLY 5 OR 6, OCCASIONALLY 7, DECREASING 4 FOR A TIME. WINTRY SHOWERS. GOOD. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message