top | item 14711407

(no title)

teacup50 | 8 years ago

No, it's merely a work-around for two very distinct and self-inflicted problems:

- 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.

discuss

order

barrkel|8 years ago

LSP is sensible for the same reason that the middle end in a compiler is sensible - it turns an MxN problem into an M+N problem.

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.

teacup50|8 years ago

Libraries solve the problem of said middle end in a compiler, and in an IDE.

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.

kibwen|8 years ago

LSP--or rather the general idea of a common interface between IDEs and language-specific static analyzers--is a very good idea regardless of GCC or VSCode. Which isn't to say that LSP made universally correct design decisions (e.g. it's fair to be grumpy at JSON), and also isn't to say that it represents the be-all end-all of IDE integration (the fact that it necessarily represents a lowest-common-denominator interface is well-understood). But having such a standard to establish a baseline of support between languages and editors with the minimal amount of work possible is something that needed to be done.

bpicolo|8 years ago

Whether or not the IDE is JS based is asymmetrical. A common format for any IDE to integrate with is a fantastic idea.

teacup50|8 years ago

That would be an API; JSON IPC is used because of the difficulty in hoisting language-native AST/indexing APIs into JavaScript.

radarsat1|8 years ago

Regardless of those points, having a standard protocol for this kind of thing makes a lot of sense, instead of binding directly to the AST data structures of each compiler.

jackmott|8 years ago

let me clarify:

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.