Currently tables module require the `hash` proc to be written manually if the 
`object` used as a key.

Why not define default `hash` function for objects? Something like:
    
    
    proc hash*[T: tuple|object](o: T): Hash =
      var h: Hash = 0
      for f in o.fields: h = h !& f.hash
      !$h
    
    
    Run

Reply via email to