int32 conversion to float64 is also safe as there is no information loss. But 
Nim chooses to be explicit by default as working around implicit (especially 
conversion) is a pain.

You can always do this:
    
    
    converter lenientInt64toInt*(x: int64): int =
      when sizeof(int) == 8:
        {.error: "int64 to int conversion is unsafe on 32-bit platforms.}
      else:
        int(x)
    
    
    Run

And now you can import it everywhere this helps.

Reply via email to