Those refs will be 8B pointers not 4B (or even 2B for many vocabularies) word numbers.
You could also have the number come from the size of the Table at incorporation time, as in: import tables type Str* = distinct uint32 var tbl: Table[string, Str] proc intern*(s: string): Str = tbl.mgetOrPut(s, tbl.len.Str) Run but now there is no way to quickly go from what Python calls `id` to a `string`. The the point of the `seq` is to make number -> string (i.e. `$`) simple & efficient. BTW, `echo` will implicitly invoke `$`, but in other contexts you may need it to explicitly get a string. Anyway, the earlier design I mentioned with a big buffer with all unique strings back to back and a dense as possible hash table is likely best for a variety of reasons. I also have an example "external" version of some of these ideas at [my suggest repo](https://github.com/c-blake/suggest).