Re: Try Finally...
From: Maarten Wiltink (maarten_at_kittensandcats.net)
Date: 10/26/04
- Next message: Bjørge Sæther: "Re: Try Finally..."
- Previous message: Francis Burton: "Re: A GOOD book wanted."
- In reply to:(deleted message) L D Blake: "Re: Try Finally..."
- Next in thread: L D Blake: "Re: Try Finally..."
- Reply:(deleted message) L D Blake: "Re: Try Finally..."
- Reply: VBDis: "Re: Try Finally..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 26 Oct 2004 11:50:04 +0200
"L D Blake" <not@any.adr> wrote in message
news:3a1sn0lud3c6ilu39gihrbsl8n98odk54v@4ax.com...
> On Tue, 26 Oct 2004 08:47:56 +0100, Duncan McNiven <duncan@mcniven.net>
wrote:
>> I for one am left with the impression that you are
>> re-writing the Delphi code to get around problems caused by
>> misunderstanding and misusing that code.
>
> and I for one am becoming deeply insulted.
Don't be, it's not what we're trying to do.
[...]
> My hope was to discuss the way the *language* itself works...
There are two ways to do that. You can discuss the way it's implemented
(and alternative ways of implementing it), or the way it's documented
to behave, apart from any implementation issues. You're doing the former
while everybody else is doing the latter.
> As I've already made plenty clear in other messages any language with
> a reserved word that depends on loaded units has one serious problem.
[...]
> Now I don't know about you... but I'd rather mess with the guts of the
> language than risk that happening.
And at the end of the day, we can choose whether to include
LaurasExceptionHandling or SysUtils in our uses clauses. And SysUtils we
already had at the start of the day.
We all know different things, and we all do-not-know different things.
You're well versed in Windows exception handling, most of us have only
seen it from the outside: what Delphi does, not even how it does it.
That makes talking about it difficult.
Checking back, your initial question in this thread was how a finally
clause should handle a non-fatal exception. I contend that this is the
wrong question to ask of a finally clause, because it does not handle
the exception at all. You also said something about how except clauses
handled fatal and non-fatal exceptions differently in your code; I
freely admit that it made no sense to me at the time.
The right thing to do, I think, would be to add a retry statement to
the language. Failing that (because nobody but Borland can do that; one
can only hook into the existing exception handling mechanism by linking
in alternate procedures), a discussion about how continuable exceptions
could be incorporated into the current language would be great. But you
could have started by explaining what they were, precisely, and _then_
we could have discussed how except and finally might react differently
to non-fatal exceptions than they do now. Pounding on implementation
details that only you understand isn't conducive to an open discussion,
either.
As an opening, I think there should be no retrying from a finally clause
at all. As Rob(?) said, a finally clause should ideally not even know if
an exception occurred or not. If one did, retrying should jump back to
the offending instruction; without one, it should do nothing. Not only
because there is nothing to retry, but it would cause an infinite loop.
I eagerly await any holes you can shoot in this.
Groetjes,
Maarten Wiltink
- Next message: Bjørge Sæther: "Re: Try Finally..."
- Previous message: Francis Burton: "Re: A GOOD book wanted."
- In reply to:(deleted message) L D Blake: "Re: Try Finally..."
- Next in thread: L D Blake: "Re: Try Finally..."
- Reply:(deleted message) L D Blake: "Re: Try Finally..."
- Reply: VBDis: "Re: Try Finally..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|