Ok, so put me down as +1 on const vectors in particular and const expressions
in general.
My next question was about constructors. I want to have multiple impls of an
face (say date as u32 number of days and date as a record of year, month, day).
I want to have constructors so that I can check ranges or normalize values for
these impls, but I don't see how to do that now. I think I need to wait for
classes to be implemented to get constructors. Is that right?
In the mean time, I am constructing dates like:
let d = (0_u32 as date).from_str("2001-04-01");
That feels a little funny to me. Is there a more elegant way to do this?
Ted
On 2012-02-20, at 14:03, Patrick Walton wrote:
> On 02/20/2012 11:44 AM, Ted Horst wrote:
>> Is there a better way to do this in rust?
>
> I think this is the sincerest form of a feature request for const vectors. :)
>
> There's a bug on it here: https://github.com/mozilla/rust/issues/571
>
> Patrick
> _______________________________________________
> Rust-dev mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/rust-dev
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev