info-gnuprologjava
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Info-gnuprologjava] gnuprologjava patch: fixes for is_list


From: Daniel Thomas
Subject: Re: [Info-gnuprologjava] gnuprologjava patch: fixes for is_list
Date: Tue, 08 May 2012 20:54:45 +0100

On Tue, 2012-05-08 at 19:31 +0100, Paul Singleton wrote:
> On 07/05/2012 22:22, Michiel Hendriks wrote:
> 
> > Small note to the patch, use TermConstants.emptyListAtom.equals(lst)
> > rather than the instance check.
> 
> Is that just good practice, or is there some way we could get two 
> distinct instances of the "empty list" atom?  AtomTerm seems designed 
> to ensure that never happens, but maybe we shouldn't rely on it...

That should never happen as == is used all over the place and various
other things need it to be true (though for floats etc. it might not
actually be true). However I still changed it to use .equals().

This has been committed and pushed.

Daniel

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]