RE: [colorforth] abort
- Subject: RE: [colorforth] abort
- From: Fréderic DUBOIS <frederic.dubois@xxxxxxxxxxxxx>
- Date: Tue, 3 Jun 2003 13:43:27 +0200
> -----Message d'origine-----
> De : Mark Slicker [mailto:maslicke@xxxxxxxxxxx]
> Envoyé : lun. 2 juin 2003 20:17
> À : colorforth@xxxxxxxxxxxxxxxxxx
> Objet : Re: [colorforth] abort
>
> I suppose crashing is ok if you don't loose important information, and
> boot times are minimal. However it is seen by many as an annoyance.
>
Even when booting very fast, crashs are a problem as you may loose
modifications. This forces you to flush/save your data on disk before
running new code. At the beginning, one expects that kind of crash, but
thereafter if a rare condition happens, you may lose both your modifications
and informations on what provoked this crash.
>
> Mark
>
> On Mon, 2 Jun 2003, Chuck Moore wrote:
>
> > Abort generates indecision in my mind. I'm disturbed by
> all the words in
> > ANSI Forth and have tried to minimize them.
> >
> > The concept of catch and throw are an example. They
> seem to emphasize
> > the importance of errors. Much better to eliminate the
> possibility of error
> > than to compensate for it. So I left out abort.
> >
I just moved from a defered ABORT to CATCH / THROW in my system. I found
that CATCH was better to handle errors. If I look at my exception list...
1 word not found
2 floppy I/O error
3 stack underflow
4 file I/O error ( DOS-hosted version )
... I see that 1. is resolved by the Colorforth editor, 3 is resolved by
using circular stack, 4 is a complexity brought by the OS, and 2 rarely
happens and cannot in general be solved. It shows that Abort and friends are
solving consequences of the problem, not the problem itself.
One of the idea of CATCH is to delay decisions on what to do when an error
occurs and let an application decide. I think this may happen when one
writes libraries, or some code to be shared. Maybe, this means we should not
do that?
Amicalement,
Frederic
---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com