On 2/18/13 9:56 PM, Ashish Myles wrote:
As traits are not parametrized by integers, and macros don't seem to be
the right tool for this, is there some other language feature that could
help me get a similar effect?

You need to use macros right now. There has been quite a bit of discussion of GHC-like type-level numeric literals (or just traits parameterized by constants) in the past, and that feature might make it in at some point. It's certainly a common feature request.

Patrick

_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to