Does rust have compile time sized arrays, equivalent to the following C++ definition?
template<int d,class T> struct array { T x[d]; }; More generally, is it possible to parameterize types by integers, so that types like the above can be built up? Finally, is it possible to parameterize functions over integers, as in fn concat<T,a,b>(x : array<a,T>, y : array<b,T>) -> array<a+b,T> { ... } If integer type arguments aren't built in, is it possible to type the concat function using a type-based encoding of naturals? Thanks! Geoffrey
_______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev