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

Okay, this is a revelation. I hadn't seen refutable lets, and this seems great!


Refutable lets also work in `while` (`while let pattern = expression { … }`), which is pretty great.


I just rewrote one of my parser functions using that, and it literally eliminated 90% of the code and improved error reporting at the same time. Very cool, thanks for the tip.





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

Search: