4 ms·
Fair enough. The reason I like Flow better is that it's better integrated into the rest of the JS/Babel ecosystem, so it gets out of your way to a greater degr
by qwertyuiop924 10y ago
Fair enough.
The reason I like Flow better is that it's better integrated into the rest of the JS/Babel ecosystem, so it gets out of your way to a greater degree than TS when you're either not using it or want JS ecosystem integration with JSX/whatever.
- KirinDave 10y ago> JS/Babel ecosystem I mean, sure. In that when you use typescript you probably don't need/want Babel, as most of the ES6 features you want are part of TS already. > JS ecosystem integration with JSX/whatever. Typescript supports both react and non-react JSX natively, so perhaps this isn't a pain point anymore? Also: you get types. Good types are great.
- qwertyuiop924 10y agoWell, yeah, but what about whatever thing comes along in Babel that will make your code an order of magnitude cleaner? What about all the tools that work with babel, rather than TS? And from what I saw, Flow has a type system at least as good as TS's. Am I wrong?
- KirinDave 10y ago> Well, yeah, but what about whatever thing comes along in Babel that will make your code an order of magnitude cleaner? Why not watch http://channel9.msdn.com/Events/Build/2016/B881 http://channel9.msdn.com/Events/Build/2016/B881 and tell me what you think. It sounds to me like they're dedicated not only to being on that, but to be part of the conversation going forward. They're already taking the well-formed parts of the next 2 iterations of JS, and adding types on top. > And from what I saw, Flow has a type system at least as good as TS's. Am I wrong? Flow has a type system that is "as good" at troubleshooting errors within the existing javascript ecosystem, as I read it. And that's good. TypeScript, unlike flow, makes newer features available with the type data.
- spion 10y agoThe problem is, Microsoft can't really do this. If they hired the creator of Babel, then proceeded to add TypeScript parsing support to it, they would immediately be accused of trying to "embrace, extend, extinguish". On second thought, that might not be such a bad idea. Babel already parses some type annotations, why not also add the little extra syntax supported by TypeScript?
- qwertyuiop924 10y agoBabel has a plugin architecture. MS could implement the TS extensions as a Babel plugin, and it would integrate with any other Babel plugin. That's what facebook did.
- spion 10y agoYeah, it might be a good idea. A parser plugin to parse valid typescript, and a strip-types stage that strips them out.
- qwertyuiop924 10y ago...And that's what Flow does.