Thanks for the quick reply (also adding back the list).

Geoffrey


On Thu, Aug 22, 2013 at 10:28 PM, John <jmgro...@gmail.com> wrote:

> For the moment, no, that's not possible.
> On Aug 22, 2013 10:23 PM, "Geoffrey Irving" <irv...@naml.us> wrote:
>
>>  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
>>
>>
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to