`templates` are also `late binding`. we can achieve similar goal using it. But 
it is not clear to see the signature of function declaration. I think 
interfaces should be placed together.
    
    
    template genHashImpl(key, hc: typed) =
      hc = hash(key)
      if hc == 0: # This almost never taken branch should be very predictable.
        hc = 314159265 # Value doesn't matter; Any non-zero favorite is fine.
    
    
    Run

[https://github.com/nim-lang/Nim/blob/ba808ba7eeeab844bf13b81b629845127ff082cd/lib/pure/collections/hashcommon.nim#L62](https://github.com/nim-lang/Nim/blob/ba808ba7eeeab844bf13b81b629845127ff082cd/lib/pure/collections/hashcommon.nim#L62)

Reply via email to