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

Oh I see. I assumed being able to explicitly yield unit meant statements were essentially just syntax sugar for unit. Thanks for the correction.


No problem! This really only comes up in very edge cases anyway, which is partially why I don’t think it’s the worst mental model for most people. As long as you know that you can’t put let in expression position, that’s really the only place it goes wrong. Most people who haven’t used a language like Ruby would even think of items as being expressions in the first place.




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

Search: