cstring as key in tables

2024-08-25 Thread zack
I would like to know if there is any objection to having a `cstring` type as key instead of `string`. I currently use the `string` type, but to avoid transforming it, I'd like to use `cstring` directly. I'm wondering because in a paragraph on Hashing in the nim help `tables` section, it is sti

cstring as key in tables

2024-08-25 Thread zack
Thank you for your prompt reply.

cstring as key in tables

2024-08-25 Thread Araq
Well the hash table does not take ownership of the `cstring` keys which could be exactly what you want. There is a specialized version of `hash` for `cstring` so go right ahead, it should just work.