Re: Static vs. Dynamic typing
Re: Static vs. Dynamic typing
- Subject: Re: Static vs. Dynamic typing
- From: Marco Scheurer <email@hidden>
- Date: Wed, 2 Jul 2003 21:47:17 +0200
On Wednesday, July 2, 2003, at 10:15 AM, Rich Warren wrote:
On 7/2/03 3:48 PM, "Eugene Lee" <email@hidden> wrote:
On Tue, Jul 01, 2003 at 11:57:32PM +0200, Marco Scheurer wrote:
:
: An uncaught exception in Objective-C kills the program too. Catching
: exceptions as to not to crash the program has nothing to do with the
: language, but how it is used (you could do the same thing in C++).
And
: crashing or not a deployed application is an engineering tradeoff.
: There could be good reasons not to crash after all. The current
: operation has probably failed, but the app might still be usable in
: it's next passage in the run loop. I agree that a quietly writing
: something in the error log is not very user-friendly, but then
crashing
: is even less user friendly, if more informative that something went
: wrong.
I guess the question comes down to a question of whether it's better
for
a program to crash or to continue running with an increased
possibility
of outputting less correct results.
Personally I feel that programs should fail fast, rather than continue
on in
an improper state.
The reason is simple, if it fails quickly, then it's easy to catch
these
errors in testing and it makes it easier to locate the error. If it
continues in an improper state, the error might not get caught during
testing, or it might be very difficult to track down since it may not
cause
any problems until long after the actual error occurred.
If you read again what I wrote, you'll see that we agree on having
programs failing during development and testing. That's why I suggested
that you always break on raise in your debugger.
The point is to eliminate bugs before they ever get to the user. And, I
feel, it is especially important to eliminate elusive or intermittent
bugs,
since these will be the hardest ones to track down later.
Precisely. However, once the app is in the end of the user, I think it
makes more sense to continue than to crash.
Marco Scheurer
Sen:te, Lausanne, Switzerland
http://www.sente.ch
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.