Re: [eclipse-users] Simple question on example in Tutorial

From: Malcolm Ryan <malcolmr_at_...25...>
Date: Thu, 3 May 2007 10:55:15 +1000
On 03/05/2007, at 5:43 AM, Lutz, Charles D wrote:
> I’m looking at the example for “Call” (Section 3.7.3 of “A Tutorial  
> Introduction”,
>
> v 21 Apr 2007) and I’m missing the point about how this defines  
> disjunction:
>
> X ; Y :- call(X).
> X ; Y :- call(Y).
<gripe>
I've got to say, this is one of the things that really annoys me  
about Prolog. Rather than define ';' explicitly as part of the  
language, it tries to be clever and express its definition _in_ the  
language, as just another operator. Theoretically that's very neat,  
but practically it's a real pain. It's because of this that you get  
mysterious error messages such as "*** trying to redefine a built-in  
predicate: (;) / 2" when a straightforward "syntax error" would be  
more appropriate.

Maybe in 0.001% of cases you might want to do something tricky,  
treating ';' as an operator, but the rest of the time it just causes  
trouble.
</gripe>

Malcolm

--
Many clever men like you have trusted to civilisation.
Many clever Babylonians, many clever Egyptians,
Many clever men at the end of Rome.
                               - G.K.Chesterton, The Napoleon of  
Notting Hill
Received on Thu May 03 2007 - 01:55:43 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 16 2024 - 09:13:19 CEST