mozilla/rust — Issue #1649: iteration library and lightweight bind syntax
Author: nikomatsakis
Created: 2012-01-24 22:20:20+00:00
State: open
Labels: rfc

I am working on a nicer iteration library. This requires a lightweight bind syntax. I am working on that too. You can see current status and get a flavor from the cargo package "iter", though the eventual plan is to move that into libcore (or libstd?)

The bind extension is that the `bind` keyword will no longer be required. So one can write `foo(a, b, _)` which means precisely the same thing as `bind foo(a, b, _)` used to, *except* that I plan to infer whether to use a boxed closure, stack closure, etc. It will also work for receivers, like `_.foo(_)`. The plan is to have the code path in the compiler be very similar to the one used for closures (`trans_bind`, for example, should go away completely).