Thanks for the link. That RFC is a great read.

> On Jan 1, 2015, at 11:09 AM, Gulshan Singh <[email protected]> wrote:
> 
> I've also heard HKT are need for this trait. See the "Lack of iterator 
> methods" section of this RFC for an explanation: 
> https://github.com/rust-lang/rfcs/blob/master/text/0235-collections-conventions.md
>  
> <https://github.com/rust-lang/rfcs/blob/master/text/0235-collections-conventions.md>
> 
> On Thu Jan 01 2015 at 9:54:20 AM Ryan Hiebert <[email protected] 
> <mailto:[email protected]>> wrote:
> I asked why there wasn't an Iterable trait in rust, for just this reason, and 
> was informed that the trait would require higher kinded types. I suspect that 
> once those arrive (sometime after 1.0) that for loops may change to use 
> Iterable instead of Iterator.
> 
> Sent from my iPhone
> 
> > On Jan 1, 2015, at 4:49 AM, Pim Schellart <[email protected] 
> > <mailto:[email protected]>> wrote:
> >
> > Dear Rust developers,
> >
> > I have just started using rust so this is obviously a stupid question but I 
> > was wondering why .iter() is needed when looping over the elements of an 
> > array? In the following example:
> >
> >    let a = [1i, 2i, 3i];
> >
> >    for e in a.iter() {
> >        println!("{}", e);
> >    }
> >
> > why can’t one simply write:
> >
> >    let a = [1i, 2i, 3i];
> >
> >    for e in a {
> >        println!("{}", e);
> >    }
> >
> > and have the compiler figure out that ‘a’ has ‘.iter()’ and use it? The 
> > form without .iter() just feels more natural to me in this case.
> > Please feel free to tell me to RTFM or ask this question elsewhere.
> >
> > Regards,
> >
> > Pim
> > _______________________________________________
> > Rust-dev mailing list
> > [email protected] <mailto:[email protected]>
> > https://mail.mozilla.org/listinfo/rust-dev 
> > <https://mail.mozilla.org/listinfo/rust-dev>
> _______________________________________________
> Rust-dev mailing list
> [email protected] <mailto:[email protected]>
> https://mail.mozilla.org/listinfo/rust-dev 
> <https://mail.mozilla.org/listinfo/rust-dev>

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

Reply via email to