Subject: [SWIPL] Type error vs. silent failure

From: Gernot Salzer <[email-masked]>
Date: Fri, 26 Oct 2001 12:26:24 +0200

[ Sorry, must have been discussed in the past, but couldn't find anything ]

Is there any rational behind      
   nth1(a, [a,b,c], X).
failing silently and
   length([a,b,c], a).
giving a type error?

The question is not whether one an tweek SWI-Prolog (or some other Prolog)
to behave one way or the other, but what I can savely assume
as a programmer when writing a portable program (as much as possible).

Thanks, Gernot