Re: Try Finally...

From: Maarten Wiltink (maarten_at_kittensandcats.net)
Date: 10/25/04


Date: Mon, 25 Oct 2004 13:56:48 +0200


"L D Blake" <not@any.adr> wrote in message
news:4ehpn0tjutc04pfj0eegaoimdjcb424o8h@4ax.com...
> On Mon, 25 Oct 2004 10:42:31 +0200, "Maarten Wiltink"
> <maarten@kittensandcats.net> wrote:

>> So, are you being unreasonable? Definitely. Is that bad? No. But I'd
>> like to see something else before you start implementing: a language
>> design.
>
> I have no intention of re-inventing Pascal or creating a new language.

Then stick to the documented semantics. I'm not saying you have to, but
be honest about what you're doing. Try-except handles exceptions,
try-finally doesn't. All this talk of continuable exceptions doesn't
change that.

[...]
> What I AM doing is trying to fix what I consider a serious shortcoming
> in Object Pascal... If you will recall my grand entrance into this
> newsgroup; I was asking for help in sorting through SEH and getting
> the $$^$&* thing to work without sysutils bloating my every program
> for no other reason than getting try/except to work.
>
> Ok we did that...

Did you? If I derive EDivideByZero from EMathError from Exception,
does your replacement code catch EDivideByZero when the code says
"except on EMathError do X;"?

[...]
> FWIW... if you have the source code for your RTL load up in SYSTEM.PAS
> and take a look at _HandleAnyException and _HandleFinally These are
> the two subroutines I'm working on right now... note how BIG they are
> and how many other subroutines they're invoking? Ok, with almost
> identical behavior I've reduced them to this...

It's the "almost" that worries me. I don't care about the size as long
as it works well enough. I do care about a few other things, like how
it says in the OPLG that it works. Every time. Not almost.

[...]
> The original Delphi7 versions of these are over 500 lines. Now if
> ever there were two subroutines just begging for a re-write!!!

Somebody once asked our bartender why tequila was so expensive. He said
"because it _is_ so expensive." Everything should be made as simple as
possible, but no simpler.

It's useful to people that exceptions are polymorphic. There is a cost.
You either pay that cost, or you don't. Borland decided for us that we,
Delphi users, will have the feature and pay the price. If that's not
good enough for you, I'm happy that they left you in a position to "fix"
it. But please, if you can't give me polymorphic exceptions in 50 bytes,
don't insist that I am wrong, or that Borland are.

Groetjes,
Maarten Wiltink



Relevant Pages

  • Re: It seems things are cheaper now but also cheaply made, am I paraniod?
    ... They used to cost about 30 dollars ... I used to pay 1200-2000 dollars for a nice home S-VHS recorder ... (usually from some fancy brand like Panasonic) ... Of course - there are exceptions - ...
    (sci.electronics.repair)
  • Re: pay me to shop elsewhere
    ... >>>What has Walmart done in the area of sexism, ... they treat women like shit and pay them less than men. ... Yes, one can find exceptions to this aplenty, but, statistically ... higher cost workers, namely men. ...
    (rec.arts.sf.fandom)
  • Re: Exceptions as a Control Structure
    ... Olivier Parisy wrote: ... >> returning information from subroutines, ... >> mechanism for returning special info). ... module has Full and Empty exceptions that are a good ...
    (comp.lang.python)
  • Re: Barack and motorcycles
    ... And who should pay for it. ... of free food, housing, etc', is Socialist. ... Barracks-type housing and feeding would be sufficient. ... Exceptions as needed for the ...
    (rec.motorcycles)
  • Re: Is MCSD worth doing?
    ... They don't even need to catch exceptions but finish ... incompetent or fraudulent use of software written by 'users', ... the short term gain in cost ... People simply fail to realize that producing high quality software is ...
    (microsoft.public.cert.exam.mcsd)

Loading