Nitpicking but just use the 
[SomeReal](https://nim-lang.org/docs/system.html#SomeReal) typeclass instead of 
this line: 
    
    
    floatingPoint = float | float64 | float32
    

By the way, I don't really understand your need but you can usually go very far 
in Nim with just generics and overloading without to implement class-like types.

If you need runtime polymorphism, don't forget to look into [object 
variants](https://nim-lang.org/docs/tut2.html#object-oriented-programming-object-variants)
 and methods (which are dispatched at runtime instead of compile-time).

Reply via email to