On 12-04-23 12:58 PM, Rick Richardson wrote:

> My line of thinking is this:
> If you have an array of four Ints, the type of the array is 4 Ints.
> It's incompatible with an array that is 5 ints without an adaptor.
> Since [] indicates a vector, and a vector in Rust has both a length
> and a type, Why not make the size of the vector the first of two
> parameters in the []?
> 
> e.g.     [N,T]
> 
> or, for unspecified length:  [_,T]  (possibly sugared to [T])

All versions of this syntax that work with the bound-inside-the-brackets
need to have something to say for the 'str' type, which has no brackets.
That's the problem.

-Graydon

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

Reply via email to