Firstly, as this seems to be the only discussion mailing list for rust, I
presumed that this might be a good place to ask newbie-ish questions.
Please correct me if I am wrong.  (I have previously played around with D,
which has separate mailing lists for learners.)
I am particularly interested in implementing and porting little utilities
to try to get a better understanding of how well the type system supports
(or gets in the way) of practical problems. I do understand rust is well in
the alpha stage and I don't have any problems with rust modifications
breaking my code.


Secondly, I was wondering how one would go about writing a rust equivalent
of the following C++ class for creating static-sized arrays interpreted as
vectors.

template <typename T, int _N>
class Vector {
public:
    enum { N = _N };

private:
    T m_v[N];
};

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?

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

Reply via email to