This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC Feature question
- From: Jason Merrill <jason at redhat dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: "Michael Lovett" <mlovett at morpace dot com>, <gcc at gnu dot org>
- Date: Tue, 01 Oct 2002 18:30:22 +0100
- Subject: Re: GCC Feature question
- References: <sd94e27f.091@farm_groupwise1_srv.morpace-i.com><m37kh693un.fsf@frogsleap.quesejoda.com>
On 27 Sep 2002 20:42:56 -0700, Aldy Hernandez <aldyh@redhat.com> 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