On 07/26/2014 12:56 PM, Patrick Walton wrote:
Well, part of the problem here is that people are going to want to write
generic functions that take addable values. If we start making `+` and
friends overloadable/ad-hoc, then people are going to be surprised when
they can't pass (say) bignums to functions that want addable things.

The current Rust doesn't allow a complete lack of surprise. Either you will be surprised by the traits not being supported by every numeric type, or you will be surprised by the terrible performance of most types that implement Op<T, T>. The core issue is that 'addable' (and other concepts/functions) cannot be expressed efficiently for all types in some unified way.

-SL
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to