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

Why should type narrowing be limited to just case, and not both case and if? I'd argue that both of these are examples of flow typing.



My point was that if your language has a dedicated facility for case analysis, you don't really need to use if statements for that purpose. You just use case. That's one answer to "why don't more languages have flow typing".




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

Search: