>   - No-pattern form now requires a dummy pattern. That is, we can't do:
>
>       for 10.times { ... }
>
>     anymore, rather we have to write:
>
>       for _ in 10.times() { ... }

I will not cry much if this happens; it is a bit clever, but maybe we
could save it by using loop:

loop 10.times { ... }

and

loop { ... }

could coexist perhaps?

>     Given we're discussing macro-izing the other main use of 'do' to
>     generate an owning thunk Trait object, It's not entirely clear to
>     me that this pattern alone warrants keeping 'do'.

I'm not sure what you mean here. Can you provide an example?

> I found it more interesting to note that, should we take 'in' as a new
> keyword, it's a perfectly reasonable keyword to reuse for the putative
> "allocation expressions" we've been talking about needing for supporting
> C++-like placement-new.

It seems reasonable to use for the partial binding in patterns as
well, although that might not work with for:

Instead of `foo @ Something(bar)` you'd write `Something(bar) in foo`.
Seems pretty nice.

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

Reply via email to