Re: [racket] objects as hash keys

2012-10-19 Thread Ted
Thansk for the answer, I didn't notice this part of the doc. In fact the (make-hasheq) doesn't fit because the objects needs to be inspect with equal? to find a match. It seems it is not possible this way, as writted in the doc. Thanks anyway. > From the docs (3.13 Hash Tables): > Caveat concerni

Re: [racket] objects as hash keys

2012-10-19 Thread Tobias Hammer
From the docs (3.13 Hash Tables): Caveat concerning mutable keys: If a key in an equal?-based hash table is mutated (e.g., a key string is modified with string-set!), then the hash table’s behavior for insertion and lookup operations becomes unpredictable. Try make-hasheq instead of make-has

[racket] objects as hash keys

2012-10-19 Thread Ted
Hi the list, I was wondering for my midi/osc -> event mapping project if it was possible to put objects instances (with racket/class) as hash keys. I tried and it worked. The problem is, I pushed further and when I change object fields, the hash can't find my key anymore, despite I see it in. For