Hacker News new | past | comments | ask | show | jobs | submit login

It's interesting, but I can't decide if it's an anti-pattern or not. You're abusing a construct to achieve a slight improvement in brevity/readability, with the downside of JS's lack of block-scoping for case statements which means variables in one case can conflict with variables in other cases

All in all: I probably won't be using it




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

Search: