🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by bs Fri, 22 Mar 1996 02:22
Re: Exception handling -- was a finally block ever considered?
#3773
Author: bs
Date: Fri, 22 Mar 1996 02:22
34 lines
2032 bytes
From: Fredrik Jonsson <euafjo@uab.ericsson.se> writes:

 > Jason D. Morris wrote:
 > > 
 > > Ok, but that still doesn't answer my question.  I didn't ask for a
 > > method for simulating a finally block, I asked if the committee had
 > > considered a finally block as part of the exception handling
 > > mechanism, and if they had, why it wasn't adopted.
 > > 
 > > Jason
 > 
 > I know the finally statement was mentioned/discussed during
 > afterwork hours at the Santa Cruz meeting but unfortunately
 > that is about it. (I agree with you that it is very convenient
 > to have the finally block, and most Borland Delphi or Java
 > programmers will agree on that.)
 > 
 > Ie. the answer to your question would be no, it has not been
 > discussed, at least not as far as I know.

A finally-clause on a try block was certainly considered during the
design of the exception handling mechanisms. I considered it ad hoc
and inelegant compared to the "resource requisition is initialization"
technique. Also, catch(...) has some of the properties (good and bad)
of a finally-clause. See for example sec 16.5 of D&E.

	- Bjarne

---
[ 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         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads