[mercury-users] range of input

Robert Ernst Johann JESCHOFNIK rejj at cat.cs.mu.OZ.AU
Wed Nov 10 20:34:21 AEDT 1999


On Tue, 9 Nov 1999, Fergus Henderson wrote:

> So what would be the advantage in letting you write it using
> the alternative syntax that you've suggested?

You specify base cases as facts, not goals hidden inside an if-then-else.
In my opinion, that would make code more readable.

(re: proposed syntax for admissability rules)
> 		:- admissable fib(X) => X > 0.		% unchecked
> 		:- check admissable fib(X) => X > 0.	% checked at runtime
> 
> 	However, it might be better to use a keyword or some other special
> 	syntax rather than `=>', to avoid mixing object level logic with
> 	meta-level logic.

How about `where' or `when'?
	:- admissable fib(X) where X > 0.
or
	:- check admissable fib(X) when X > 0.

(I'm not proposing a different keyword for the two types of rule here,
this is just an example)
Perhaps this should be "checked adbmissable" instead of "check
admissable"..
Hrm, I think I prefer `where'.


Rob
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list