[rust-dev] std::num::pow() is inadequate / language concepts

Marijn Haverbeke marijnh at gmail.com
Fri Jul 25 05:06:26 PDT 2014


Hello Gregor,

Firstly, blanket statements like "This makes generic programming
impossible" and "it does not allow proper software design" are
unneccesary hyperbole, and do not help the discussion in any way.

Traits provide a more well-defined, easier to reason about alternative
to overloading. They do require the author of an algorithm to decide
ahead of time whether this algorithm needs to be specializeable, which
I guess C++-style overloading does not. Whether that is a good or a
bad thing is debatable, but it is not true that Rust lacks a feature
for specialization.

Best,
Marijn


More information about the Rust-dev mailing list