On Mon, Jul 24, 2017 at 04:05:12PM -0400, David Malcolm wrote: > This patch adds an lsp::server abstract base class for implementing > servers for the Language Server Protocol: > https://github.com/Microsoft/language-server-protocol > > along with supporting classes mirroring those from the protocol > description. > > The public specification of the protocol uses CamelCase, and so these > classes use CamelCase, to mirror the protocol definition. > > Only a small subset of the protocol is implemented, enough for > a proof-of-concept. > > Ideally much/all of this would be autogenerated from the > protocol definition.
I think my big question on this part of the series is why you chose to implement this yourself instead of using something like libjsonrpccpp for most of it. I don't have any attachment to that particular library, but I don't see any real advantage to be gained from implementing a json parser ourselves. > The patch also implements an ::lsp::jsonrpc_server subclass of > ::jsonrpc::server, handling the marshalling from JSON-RPC to > an lsp::server instance, expressing them as vfunc calls. That's not my favorite approach to this space, but its certainly a common and reasonable one. You can probably get rid of the virtual call overhead with final, and in networking or at least file descriptor based communication it almost certainly doesn't matter anyway. Trev