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

Would if/else have been considered optimal to you if you hadn’t already been conditioned (ha!) that way by other programming languages?

“When” actually seems better in a purely declarative language.



Maybe it's prior exposure to lisp, but I wouldn't expect "when" to have an "else" clause. Can't think of an idiomatic natural-language case with that structure either.


I have never used SASS and if/else is obviously better than when/else.




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

Search: