From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6145 invoked by alias); 1 Aug 2008 15:17:39 -0000 Received: (qmail 6136 invoked by uid 22791); 1 Aug 2008 15:17:38 -0000 X-Spam-Check-By: sourceware.org Received: from mtaout1.012.net.il (HELO mtaout1.012.net.il) (84.95.2.1) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 01 Aug 2008 15:17:19 +0000 Received: from HOME-C4E4A596F7 ([84.229.228.238]) by i-mtaout1.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K4X0072KH39KP40@i-mtaout1.012.net.il> for gdb@sourceware.org; Fri, 01 Aug 2008 18:16:22 +0300 (IDT) Date: Fri, 01 Aug 2008 15:17:00 -0000 From: Eli Zaretskii Subject: Re: GDB to C++ issue: deletion In-reply-to: <20080801135920.GA17022@caradoc.them.org> X-012-Sender: halo1@inter.net.il To: Daniel Jacobowitz Cc: gdb@sourceware.org Reply-to: Eli Zaretskii Message-id: References: <200807312204.m6VM4JQM007611@tully.CS.Berkeley.EDU> <200808011054.24219.apoenitz@trolltech.com> <20080801125124.GA13594@caradoc.them.org> <20080801135920.GA17022@caradoc.them.org> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-08/txt/msg00016.txt.bz2 > Date: Fri, 1 Aug 2008 09:59:20 -0400 > From: Daniel Jacobowitz > Cc: gdb@sourceware.org > > It's not clear locally (i.e. looking at any bit of code that uses > cleanups) when or how the cleanups are executed. They're usually > triggered by an exception from some called function, and the code that > invokes the cleanups is far away. In C, people do not expect > exceptions and so they're confused by the introduction of exception > handling. Thanks. I understand what you are saying, but no longer can imagine why people would find this confusing. Perhaps I'm too used to Lisp, C++, and the C code in the Emacs Lisp engine to find exception handling confusing. > Sometimes we run cleanups and sometimes we discard them. This is > confusing. It's not something that would be necessarily affected by a > change in language but use of an OO language might make it easier to > represent. Exceptions have nothing to do with OOP. It's just a feature that is not part of C, so it needs to be emulated.