- The pain of exposing language-native compiler/language AST and indexing APIs to a JavaScript IDE.
- RMS' inability to accept that GCC might need to expose an AST to external consumers, and his paranoia regarding how that might undermine his GPL-everywhere ideals.
Using JSON for local IPC -- and requiring IDE language support to funnel itself across that high-overhead IPC connection -- is fey.
For compilers, M is source languages and N is target platforms. For LSP, M is source languages and N is editors.
They both have the same downside. The more esoteric the language feature, the lower the fidelity of support in the common middle.
If you insist on using IPC, then you've incurred a great deal of friction in a place that it matters.
If you insist on using JSON IPC, then you've incurred a great deal of overhead in a place that it matters.
The fact that the HN community seems to have jumped aboard this idea, "yeah let's just require a server to do something simple like format text in your editor", is completely flabbergasting. People just seem to have NO IDEA how much complexity they are adding, and don't care.
Maybe in 5 years our machines will be running 10,000 processes at boot because people will want a server for every operation...
What VSCode has pioneered, and this is something which Atom got wrong, is a multi-process model, where the various IDE components communicate via IPC. This improves stability and allows isolation of 3rd party plugins, and provides mostly foolproof parallelism. When plugins are such a big part of the experience, this is a very good thing. It's a deliberate design decision, not some attempt to overcome the failings of JavaScript.
Couple this with the fact that limiting "API" to mean "C ABI" forces every compiler author to start exposing complex C structures, unsafe pointers and the like - which if their compiler is written in, say Haskell, or LISP is going to be particularly painful, v.s. implementing text-based RPC over a socket in whatever way is best for them.
If Language Server had been a C API then I seriously doubt it would have got much traction, as it's just too awkward for many compiler authors to implement. Unsafe C APIs are, frankly, last century's technology.
shipping along with your language, some kind of API that is standardized so that editors can easily add high quality IDE level features to support new languages is a great idea
that this is currently being done via a server + json over pipes or whatever is a suboptimal way to do it, I agree.