[Openmcl-devel] Is it safe to make hash tables with non-standard tests?
ron at flownet.com
Sun Jul 14 21:01:56 CDT 2013
On Jul 14, 2013, at 6:45 PM, Tom Emerson wrote:
> WRT symbols, fair enough. I'd assumed #'string= for strings, not necessarily things that can become strings.
Those are called string designators.
> I guess wrapping in symbol-name is a portable way to do it.
Yes, I considered that, but there are reasons I don't want to do it. If you really want to know tell me and I'll describe my design constraints. It's a long story.
> But as Gary says, if you're not worried about portability then #'string= will be what you want.
I don't care about portability. I do care about efficiency, security. and memory leaks. So, for example, I don't want to intern my symbols because I fear they won't be garbage collected. (Empirically, CCL seems to be pretty good about collecting useless symbols even if they are interned, but it still makes me queasy.) I have to handle data from untrusted sources, and EQUAL is subject to denial-of-service attacks if someone manages to, say, inject a circular list as a key.
Stuff like that.
More information about the Openmcl-devel