Subject: Re: Re: [SWIPL] Type error vs. silent failure

From: <[email-masked]>
Date: Tue, 30 Oct 2001 19:07:01 EST

> Dear friends I speak spanish. Because. I dont understand yor mail

Please write me . I am from Colombia.

Thank you.
> De: Paul Singleton <[email-masked]>
> Fecha: 26-Oct-2001 09:01
> Para: [email-masked]
> Asunto: Re: [SWIPL] Type error vs. silent failure
> 
> Jan Wielemaker wrote:
> 
> > Only in some really performance-critical situations I sometimes estimate
> > whether using catch/3 or checking is more efficient.  Note that catch/3
> > is not cheap for many reasons.  The call is a meta-call, you have to
> > push the goal, template and recovery onto the stack and if an exception
> > happens another expensive unwinding and meta-call must take place.
> 
> 
> Please reassure us that the "exception doesn't happen" cost is nothing
> to be afraid of :-)
> 
> If not, is it inherently expensive, or could it e.g. be compiled as a
> special case?
> 
> > Next is coding:
> > 	
> > 	catch(nth1(N, List, E), error(type_error(_), _), fail)
> > 
> > isn't really pretty, but 
> > 
> > 	catch(nth1(N, List, E), _, fail).
> > 
> > May give some undesired results.  Maybe nth1/3 isn't around and your
> > goal now fails silently rather then with an error.  Maybe the system
> > runs out of stack, but this code will silently fail!
> 
> 
> Java pragmatically distinguishes "checked" and "unchecked" exceptions,
> then imposes static checking on checked exceptions (must be either
> handled or explicitly declared to be possibly thrown).  Is it feasible
> to do such static checking on (some practically useful subset of)
> ISO or SWI Prolog?
> 
> Paul Singleton
> 
> PS I am not suggesting that it must be a good idea because Java does 
> it, but that software engineering issues like this are essentially
> pragmatic, not theological, and that there's been enough experience
> with the Java scheme for us to decide whether it was well judged or
> misconceived...
> 
> 
> 
> ----------------
> * To UNSUBSCRIBE, please use the HTML form at
> 
>     http://www.swi.psy.uva.nl/projects/SWI-Prolog/index.html#mailinglist
> 
> or send mail to [email-masked] using the Subject: "unsubscribe"
> (without the quotes) and *no* message body.
> 
> ** An ARCHIVE of this list is maintained at
> 
>     http://www.swi.psy.uva.nl/projects/SWI-Prolog/mailinglist/archive/
> 
> 

------------------------------------------------------------------------------

Obtén gratis tu cuenta de correo en StarMedia Email.
¡Regístrate hoy mismo!. http://www.starmedia.com/email

------------------------------------------------------------------------------