typescript-vs-flowtype icon indicating copy to clipboard operation
typescript-vs-flowtype copied to clipboard

Miss important factor: Language services / language server protocol support

Open cancerberoSgx opened this issue 5 years ago • 3 comments

I don't know about flow but you forgot to mention an important aspect about TypeScript. Is more than a language, is a language server, similar to LSP (https://github.com/Microsoft/language-server-protocol)) but on its own. General users won't use that API, but TS architecture force users to use their server (tsserver) running in the IDE / editor. This new concept although could seem not KISS, I think in part is why TS UX is faster than flow cause server is managing the project. Also as user you can develop a plugin for refactor, suggestion, folding, fixes, etc and it will work out of the box on any IDE supporting tsserver,

Although there are no much plugins today and ts team is advancing slowly in this aspect I think is a good idea. Perhaps in time will be obsolete in favor of LSP, who now . I'm learning how to use TS Compiler API myself because I want refactor plugins like those you have in other strongly typed languages / IDEs ike Java/eclipse (like move this method to this other class) and these are some I have (WIP) https://github.com/cancerberoSgx/typescript-plugins-of-mine/tree/master/typescript-plugin-proactive-code-fixes

In the future, perhaps now, flow could tackle this implementing LSP (probably there is already one) but TS is in advantage because tsserver API is very close to the language and LSP is more generic since it needs to support all. On the other hand, depending on a server for managing the project could have negative consequences in large projects performance IMO

I think this aspect is very interesting in the comparison too.Nice work, keep it up, couple of links:

https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API https://github.com/Microsoft/TypeScript/wiki/Standalone-Server-%28tsserver%29 https://github.com/Microsoft/TypeScript/wiki/Writing-a-Language-Service-Plugin

cancerberoSgx avatar Jul 15 '18 10:07 cancerberoSgx

Flow has LSP support

sibelius avatar Jul 15 '18 11:07 sibelius

I know would be interesting to see in which platforms / languages and what's the quality of the implementations.

cancerberoSgx avatar Jul 15 '18 12:07 cancerberoSgx

Indeed, quality of LSP is an interesting factor, so I'd welcome a PR adding the comparison of LSP in both platforms.

niieani avatar Aug 25 '18 14:08 niieani