Re: Prolog goals order
- From: "Peter Wing Larsen" <peterwing@xxxxxxx>
- Date: Thu, 24 Aug 2006 20:07:13 +0200
"Jan Wielemaker" <jan@xxxxxxxxxxxxxxxxxxx> wrote in message
news:slrneerhds.t79.jan@xxxxxxxxx
On 2006-08-24, Peter Wing Larsen <peterwing@xxxxxxx> wrote:[snip]
"Mauro DiNuzzo" <picorna@xxxxxxxxx> wrote in message
news:ZYHEg.145$%37.109@xxxxxxxxxxxxxxxxxxxxxx
However, it deals with the order of the goals in a clause. I will
consider
mathematics for simplicity, but I think it could be applied whereever.
My question is: "why Prolog does not change itself to overcome this
problem?".
This is also something I have thought about as a novice prolog learner.
Is
there any reason why prolog is this way?
I think the answer is that Prolog is not a theorem prover, but a
programming language. If I write write(a), write(b) I want "ab" and
not "ba", so order matters. If the system starts reordering things,
you as a programmer quickly do not feel in control any longer. If
you have two goals and you cannot put them in the right order because
it is depending on the runtime behaviour there are several options.
Thanks for the explanation. That makes sense.
.
- References:
- Prolog goals order
- From: Mauro DiNuzzo
- Re: Prolog goals order
- From: Peter Wing Larsen
- Re: Prolog goals order
- From: Jan Wielemaker
- Prolog goals order
- Prev by Date: Re: Prolog goals order
- Next by Date: Re: Prolog goals order
- Previous by thread: Re: Prolog goals order
- Next by thread: Re: Prolog goals order
- Index(es):
Relevant Pages
|
|