Re: how do you terminate an application?
- From: "Mark Hurst" <markh@ NOTTHISBIT keysound.com>
- Date: Sat, 11 Feb 2006 18:03:32 -0000
Actually your message has reminded me that this is a bit of a side-track - I
didn't set out to claim that aborting a process is watertight, that
discussion was prompted by someone else's 'malloc' example. Failing to
release resources is just as wrong if you don't use 'End', but that was the
point of the message where I wrote
I have yet to meet anyone who could tell me what is intrinsically
wrong with 'End' if it's used thoughtfully and appropriately
Even leaving off the 'appropriately' (which appears to be controversial),
this means I'm expecting people not to just invoke 'End' willy-nilly. I'd
expect them to invoke it after the same careful design decisions as they
would make before initiating any other sort of shutdown. To be honest, when
I wrote that message (and my first message in this thread) ALL I was
thinking about was using 'End' to avoid the same sorts of contrived
situations for directing control flow that happen when people develop
irrational phobias to 'Goto' or 'Exit Do' or such like.
If you have truly never heard of such messes, then you need to go around
the block a few more times.
Sure, I never was a blood and guts Windows programmer and I haven't
programmed *anything* for over five years. None of which is relevant. I am
simply asking, in my naivety, someone to demonstrate evidence for the
popular belief that the 'End' keyword is dangerous or buggy or in some other
way bad.
I think writing this message has made me realise why this is proving so
troublesome. It's because it's so patently obvious that using 'End' just as
thoughtfully as you would use any other construct is no more or less
dangerous that people have assumed the argument is about something else.
Now, having thought about *that* a while, I have to grudgingly admit that as
a defensive programming strategy, avoiding 'End' avoids the collateral
danger of hiding bugs that would otherwise show themselves.
MarkH
"Steve Gerrard" <mynamehere@xxxxxxxxxxx> wrote in message
news:QNGdnbOE1bpmknPeRVn-ow@xxxxxxxxxxxxxx
"Mark Hurst" <markh@ NOTTHISBIT keysound.com> wrote in message
news:dskb07$ucr$1@xxxxxxxxxxxxxxxxxxxxxxx
I suppose what I'm asking is foryou (or whoever) to be able to put your finger on WHAT that 'mess' might
be, rather than just assuming that there will be one. I am not yet
convinced there will be any such mess beyond a bunch of temporary files.
(Which is a legitimate objection, but hardly earth-shattering).
The fact that modern operating systems contain provisions for dealing with
poorly written programs is a lame excuse for using poor programming
practices.
Yes, Win 2003 server has application pooling, with automated restarts of
applications to ensure that thread locking, resource snarling, memory
leaking, and other such messes do not bring the server to its knees.
However, most admins would vastly prefer to have programs that were well
behaved in the first place.
If you have truly never heard of such messes, then you need to go around
the block a few more times. Try subclassing a window in VB, opening a file
through CreateFile API, then terminating your program with End. That
should get you started.
.
- Follow-Ups:
- Re: how do you terminate an application?
- From: Alfie [UK]
- Re: how do you terminate an application?
- From: Dag Sunde
- Re: how do you terminate an application?
- References:
- how do you terminate an application?
- From: deostroll
- Re: how do you terminate an application?
- From: Max Kudrenko
- Re: how do you terminate an application?
- From: Steve Gerrard
- Re: how do you terminate an application?
- From: J French
- Re: how do you terminate an application?
- From: Mark Hurst
- Re: how do you terminate an application?
- From: neilanessa
- Re: how do you terminate an application?
- From: Mark Hurst
- Re: how do you terminate an application?
- From: Steve Gerrard
- Re: how do you terminate an application?
- From: Michael B . Johnson
- Re: how do you terminate an application?
- From: Mark Hurst
- Re: how do you terminate an application?
- From: Dag Sunde
- Re: how do you terminate an application?
- From: Mark Hurst
- Re: how do you terminate an application?
- From: Steve Gerrard
- Re: how do you terminate an application?
- From: Mark Hurst
- Re: how do you terminate an application?
- From: Steve Gerrard
- how do you terminate an application?
- Prev by Date: Re: Share oracle database in network
- Next by Date: Re: how do you terminate an application?
- Previous by thread: Re: how do you terminate an application?
- Next by thread: Re: how do you terminate an application?
- Index(es):
Relevant Pages
|