Re:Zig's Curious Multi-Sequence for Loops
by brundolf on Monday February 27, 2023 @01:32PM
(#34960135)
Interesting, are "trusted-length" iterators something that might ever make it into userspace? Maybe as const generics?
[ Parent
| on HN ]
Re:Zig's Curious Multi-Sequence for Loops
by masklinn on Monday February 27, 2023 @01:39PM
(#34960222)
It’s already in userspace, though nightly (and unsafe, obviously), so weather it’ll be stabilised, and in what form, is an open question: https://doc.rust-lang.org/std/iter/trait.TrustedLen.html