Nim is statically typed, meaning it checked at compile-time that you are not 
mixing apples and oranges unless you specifically allows that.

That is because mixing types (integers and booleans, floats and integers) or 
quantities (miles and meters) is a big source of bugs in weakly typed languages.

You can import the `lenientops` module if you want less strict math operators:
    
    
    import math, lenientops
    
    echo 2^2*2.0
    
    
    Run

Reply via email to