I never understood why Nim doesn't allow this. 

If you want to keep the same name and use overloading, one option is to use a 
_var_ argument instead of return. This works:
    
    
    proc myBirthday(n: var int) =
      n = 372297600
    
    proc myBirthday(s: var string) =
      s = "October 19, 1981"
    
    var s : string; myBirthday s
    
    var n : int; myBirthday n
    
    echo "Human Date:  ", s
    echo "Unix Time:   ", n
    

Reply via email to