[Top][All Lists]

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

Re: [Axiom-developer] pointers

From: Tim Daly
Subject: Re: [Axiom-developer] pointers
Date: Mon, 09 Nov 2009 21:38:26 -0500
User-agent: Thunderbird (Windows/20090302)

OpenAxiom's choice is perfectly rational as far as I can tell.
The only issue would be that Aldor hashing would not equal Spad hashing.
I do not know where hashing is used at the Spad level.

Spad domains are stored in $ConstructorCache, once they are created.
In a newly started session do:

)lisp (gethash '|Fraction| |$ConstructorCache|)   ==> nil

then do

)lisp (gethash '|Fraction| |$ConstructorCache|) ==> ((((|Integer|)) 2 . #<vector 08beb9f4>))

So spad domains are hashed internally.

I recommend that we follow OpenAxiom's lead on this provided nothing breaks.


Bill Page wrote:

Besides the fact that from the standard we only have that

  (equal x y) implies (= (sxhash x) (sxhash y)).

Do you see any reason why SXHASH is not used by default in SetCategory?

Note: OpenAxiom currently defines this default:

      hash(s : %):  SingleInteger == SXHASH(s)$Lisp

Bill Page.

On Mon, Nov 9, 2009 at 7:51 PM, Tim Daly <address@hidden> wrote:
There is a lisp function to get the hash value of any object
call sxhash. You can call it.


Note that if


EQ(a,c)$Lisp is false
SXHASH(a)$Lisp is not equal to SXHASH(c)$Lisp

Thus the hash function you seek already exists.
You just have to accept the fact that Spad is only syntactic
sugar for lisp code and lisp is not evil.

reply via email to

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