Wish there were a better type system for numbers. ...
# mathematics
b
Wish there were a better type system for numbers. It would be nice to do arithmetic on two numbers of the same type/context. Also arbitrary precision with a compiler flag would be nice. Just read this discussion: https://discuss.kotlinlang.org/t/how-to-write-generic-functions-for-all-numeric-types/7367/6
a
It seems to be already working that way in kmath. The type is inferred in compile time, but the expression itself is universal for all types. Also there is an example for expression that is defined outside of context, but it is tricky to make it perform fast.