Skip to content

iteration library and lightweight bind syntax #1649

@nikomatsakis

Description

@nikomatsakis

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).

Metadata

Metadata

Assignees

Labels

A-frontendArea: Compiler frontend (errors, parsing and HIR)C-enhancementCategory: An issue proposing an enhancement or a PR with one.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions