RE: Pre-RFC: Break with value in for/while loops

This is uncalled for. I do understand type theory, and uninhabited types would work seemlessly with the generator solution.

After think about it a bit more, we don't actually need to special case based on inhabitedness. It would just fall out of the generator desugaring.

https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=fd5320f4b2b7f258ff8bfa45aa06aadf

This should just fall out of the generator desugaring I showed above.

Yes, this is what I mean as well

I don't know about this. Iterator is pretty useless without combinators. (You can't easily iterate over two things in lock step). Also chaining iterators is now impossible, and oh look, fairly useless iterators. At this point iterators are only useful as a minor performance improvement. (While this may be enough, it isn't what makes Iterator the perfectly designed trait that it is)

The compiler can reason about inhabitedness so you don't need to.

9 posts were merged into an existing topic: How special is the ! type?