eudoxia0 / cl-yaml

YAML parser for Common Lisp
61 stars 7 forks source link

Is it correct behavior to use equalp for hash tables? #14

Closed fisxoj closed 4 years ago

fisxoj commented 4 years ago

Hello! Thanks for the library (and several others).

I was noticing an interesting problem recently in a project where the lowercase string "id" had special meaning as an object key and the value of a key "Id" was being passed into the special code, which made me realize that the library makes its hash tables with :test 'equalp, which is case-insensitive.

Just to reiterate, asking for the key "id" was getting me the value of the key "Id", which was unexpected.

Is there a specific reason to do that, or could it be made more specific to use 'equal instead?

eudoxia0 commented 4 years ago

I think I got this wrong because equalp is the only equality testing function that works for hash tables. I'll make the change.