From 7367622455384773376
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,96a8c01f7043c2d9
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2002-09-10 19:55:51 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!kibo.news.demon.net!mutlu.news.demon.net!demon!mail2news.demon.co.uk!devnull
From: pierrebai@hotmail.com (Pierre Baillargeon)
Newsgroups: comp.std.c++
Subject: Re: Proposal: exception stack unwinding resumption
Date: Wed, 11 Sep 2002 02:55:51 +0000 (UTC)
Organization: http://groups.google.com/
Lines: 36
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <6df0c6a8.0209100534.619b8531@posting.google.com>
References: <6df0c6a8.0208260746.633710cb@posting.google.com> <zllb9.458$S51.25977@newsfep1-gui.server.ntli.net> <6df0c6a8.0209030656.249192ce@posting.google.com> <tHkd9.24180$5g6.553497@newsfep2-win.server.ntli.net> <6df0c6a8.0209051026.5df687db@posting.google.com> <ar_e9.1193$Yc7.36404@newsfep2-gui>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: mail2news.demon.co.uk 1031712951 16636 10.0.0.1 (11 Sep 2002 02:55:51 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Wed, 11 Sep 2002 02:55:51 +0000 (UTC)
X-Received: from mulga.cs.mu.oz.au ([128.250.1.22])
	by news.demon.co.uk with esmtp (Exim 4.05)
	id 17oxfR-0004KB-00
	for mail2news@news.news.demon.net; Wed, 11 Sep 2002 02:55:49 +0000
X-Received: by mulga.cs.mu.OZ.AU
	id MAA02256; Wed, 11 Sep 2002 12:55:16 +1000 (EST)
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Path: comp-std-cpp-robomod!not-for-mail
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Delivered-To: std-c++@ncar.ucar.edu
X-Newsgroups: comp.std.c++
X-NNTP-Posting-Date: 10 Sep 2002 13:35:00 GMT
Xref: archiver1.google.com comp.std.c++:13787

glancaster@ntlworld.com ("Garry Lancaster") wrote in message news:<ar_e9.1193$Yc7.36404@newsfep2-gui>...
>
> Pierre Baillargeon:
> > I'd agree if RAII had not made me so much more productive. I could
> > write a long rant detailing my experience, but I'll simply say this:
> > these posts made me reflect on my usage of RAII and I realized that
> > for an entire year I completely forgot that there could be bugs in the
> > base layer of my design because it has been so flawless, thanks to
> > RAII. Unfortunately, it means my destructors can throw.
> 
> If you are using your throwing destructors with the
> standard libary or any other template library you
> really need to address this misconception. See
> for example this part of the C++ standard:

I am not, so the point is not relevant. To give you an idea of the
kind of work I do using RAII, I use it to output the structure of a
PDF file. The PDF specification requires a lot of meta information to
be kept around and output later, and all data is embedded in objects
with different layers of embedding, compression and encoding. Without
RAII, the user must remember when to call each little function.
Everything has a header and footer, most of the time multi-levels. It
is easy to get wrong and the PDF tools are not friendly as far as
error reporting goes.

I can't possibly show you proprietary code. I believe I already know
the possible alternative. I also know from experience that anything
that can be automated must be, it's the only way to reduce the error
rate while improving productivity.

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



