Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> And a for loop can be executed 0 times, so without a mechanism for a fallback it might not have a value to yield.

I would think that and the similar case where no iteration hits break are solvable by having a for loop return an optional type.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: