This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC Feature question


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]