On Wed, Jan 25, 2012 at 12:18 PM, Marijn Haverbeke <mari...@gmail.com> wrote: > That works, but doesn't provide the conceptual simplicity of a number > interface, and if you want to write a generic over any numeric type, > it could end up taking a <T: add, mult, sub, div> type parameter.
It might be foolish simplicity in this case. How hard/theoretically sound would it be to support iface multiple inheritance, so you can have your 'num' typeclass be a subclass of add, mul, sub, div? And how about separating the integer quotient from field division ifaces, since they're different operations, and a routine written for one likely won't work for the other? -Joe _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev