4 ms·
Hey, I don't see TypeScript as being behind on control flow analysis or anything like that. If you're referring to differences in the way TypeScript narrow typ
by DanRosenwasser 10y ago
Hey, I don't see TypeScript as being behind on control flow analysis or anything like that.
If you're referring to differences in the way TypeScript narrow types based on control flow analysis, we don't see one as being "better" than the other, but TypeScript takes a more optimistic approach to avoid putting users in frustrating scenarios where the analysis is too limited. Most users tend to prefer this to the slightly more rigid approach used in Flow, so we felt we made an ideal choice there.
If you have any specific thoughts or ideas, feel free to leave us feedback on our issue tracker.
- shados 10y agoTo be fair, it is very, very unlikely that I am better at type systems than someone working on TypeScript, so anything I'd suggest, you probably heard about, and is either already on your roadmap, or was a conscious design decision that we just happen to disagree about :) I think the javascript type system world is still evolving, and the only "wrong" thing to do is to say "Ok, its a solved problem, let's run away with THIS ONE and kill the others". As long as we still have at least 2 reasonably well known ones, I'm happy.