|
|
Log in / Subscribe / Register

Rust's for-loop construct probably changed

Rust's for-loop construct probably changed

Posted Jul 11, 2013 23:35 UTC (Thu) by thestinger (guest, #91827)
In reply to: Rust's for-loop construct probably changed by eternaleye
Parent article: Philosophy and "for" loops — more from Go and Rust

You can currently use tasks to make an `Iterator` implementation, but context-switching for each iteration is too much overhead to be the iteration building block. C# has the ability to compile a generator to a state machine, and it's something Rust can implement in the future.


to post comments


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds