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

Its incredibly powerful! One downside is variables captured in the match are lifted to the function level. The lack of block level scoping in the match statement leads to a lot of people shooting themselves in the foot by overwriting a variable that they didn't intend to. On a personal note, I find the 2 levels of indentation to reach the case body to be too much as well... but that's just a personal preference.


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

Search: