3 ms·
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.
by yxhuvud 5y ago
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.
- colonwqbang 5y agoMy 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".