From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1995 invoked by alias); 4 Oct 2002 19:11:21 -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 1930 invoked from network); 4 Oct 2002 19:11:13 -0000 Received: from unknown (HELO fencepost.gnu.org) (199.232.76.164) by sources.redhat.com with SMTP; 4 Oct 2002 19:11:13 -0000 Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.10) id 17xXqz-0008T5-00 for gcc@gnu.org; Fri, 04 Oct 2002 15:11:13 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17xXqH-0002Ci-00 for gcc@gnu.org; Fri, 04 Oct 2002 15:11:00 -0400 Received: from fh-fw.morpace.com ([208.193.109.82]) by monty-python.gnu.org with smtp (Exim 4.10) id 17xXqG-00023C-00 for gcc@gnu.org; Fri, 04 Oct 2002 15:10:28 -0400 Received: from farm_dom-Message_Server by farm_groupwise1_srv.morpace-i.com with Novell_GroupWise; Fri, 04 Oct 2002 15:06:53 -0400 Message-Id: Date: Fri, 04 Oct 2002 12:52:00 -0000 From: "Michael Lovett" To: , Cc: Subject: Re: GCC Feature question Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Spam-Status: No, hits=-2.7 required=5.0 tests=INVALID_MSGID,MSG_ID_ADDED_BY_MTA_3,QUOTED_EMAIL_TEXT, RCVD_IN_RFCI,SPAM_PHRASE_02_03,SUPERLONG_LINE version=2.41 X-Spam-Level: X-SW-Source: 2002-10/txt/msg00285.txt.bz2 Well, sometimes there are things you want to do locally in your code that d= on't necessarily involve object destruction, and you'd like these things to= happen whether or not an exception was thrown. These are the types of thin= gs we are anxious for try/finally. M >>> Jason Merrill 10/01/02 01:30PM >>> On 27 Sep 2002 20:42:56 -0700, Aldy Hernandez wrote: > > We are porting apps to UNIX from Windows but so far can't find a > > compiler with try/finally. It is such a useful, convenient construct > > it is hard to imagine structured programming without it. > > C or C++? With C++ you can emulate it with constructors, albeit ugly. It's not *that* ugly. For C++ using a destructor encourages you to write reusable finalization code. Jason