From jan@swi.psy.uva.nl Fri Oct 26 15:40:02 2001
Received: from gollem.swi.psy.uva.nl (root@gollem [145.18.152.30])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f9QDe2t18796;
	Fri, 26 Oct 2001 15:40:02 +0200 (MET DST)
Received: from localhost (localhost [[UNIX: localhost]])
	by gollem.swi.psy.uva.nl (8.11.3/8.11.3/SuSE Linux 8.11.1-0.5) id f9QDe2v17714;
	Fri, 26 Oct 2001 15:40:02 +0200
From: Jan Wielemaker <jan@swi.psy.uva.nl>
Organization: SWI, University of Amsterdam
To: Paulo Moura <pmoura@noe.ubi.pt>
Subject: Re: [SWIPL] Type error vs. silent failure
Date: Fri, 26 Oct 2001 15:37:29 +0200
X-Mailer: KMail [version 1.0.29.2]
Content-Type: text/plain
Cc: Paulo Moura <pmoura@noe.ubi.pt>, Gernot Salzer <salzer@logic.at>,
   prolog@swi.psy.uva.nl
References: <3FAFAD7F-CA16-11D5-8334-00039315BB3A@noe.ubi.pt>
In-Reply-To: <3FAFAD7F-CA16-11D5-8334-00039315BB3A@noe.ubi.pt>
MIME-Version: 1.0
Message-Id: <01102615400102.08005@gollem>
Content-Transfer-Encoding: 8bit

On Fri, 26 Oct 2001, Paulo Moura wrote:
>On Sexta, Outubro 26, 2001, at 12:01 , Jan Wielemaker wrote:
>
>> Gernot,
>>
>>> [ Sorry, must have been discussed in the past, but couldn't find 
>>> anything ]
>>
>> Not on this list, but in general, I assume it must be.
>>
>>> Is there any rational behind
>>>    nth1(a, [a,b,c], X).
>>> failing silently and
>>>    length([a,b,c], a).
>>> giving a type error?
>>
>> Not really, apart from the fact that length is part of the ISO standard
>> and the standard prescribes the tests to be made and the exceptions they
>> should raise, while nth1/3 isn't.
>
>Hum? I'm almost certain that length/2 is NOT in the ISO standard.

Oops, you're right.  The argument still holds for things that are
though as well as the remainder of my post is still explaining the
existing difference.

	Sorry --- Jan

	

