{"action":"opened","issue":{"url":"https://api.github.com/repos/Microsoft/language-server-protocol/issues/39","repository_url":"https://api.github.com/repos/Microsoft/language-server-protocol","labels_url":"https://api.github.com/repos/Microsoft/language-server-protocol/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/language-server-protocol/issues/39/comments","events_url":"https://api.github.com/repos/Microsoft/language-server-protocol/issues/39/events","html_url":"https://github.com/Microsoft/language-server-protocol/issues/39","id":166989023,"number":39,"title":"Compatibility with statically typed languages","user":{"login":"spoenemann","id":4067210,"avatar_url":"https://avatars.githubusercontent.com/u/4067210?v=3","gravatar_id":"","url":"https://api.github.com/users/spoenemann","html_url":"https://github.com/spoenemann","followers_url":"https://api.github.com/users/spoenemann/followers","following_url":"https://api.github.com/users/spoenemann/following{/other_user}","gists_url":"https://api.github.com/users/spoenemann/gists{/gist_id}","starred_url":"https://api.github.com/users/spoenemann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spoenemann/subscriptions","organizations_url":"https://api.github.com/users/spoenemann/orgs","repos_url":"https://api.github.com/users/spoenemann/repos","events_url":"https://api.github.com/users/spoenemann/events{/privacy}","received_events_url":"https://api.github.com/users/spoenemann/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-22T07:49:24Z","updated_at":"2016-07-22T07:49:24Z","closed_at":null,"body":"Some parts of the protocol cannot be implemented properly in statically typed languages such as Java. Examples:\r\n\r\n * [Completion Request](https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md#completion-request) response result: `CompletionItem[] | CompletionList`\r\n * [Hover](https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md#hover): `type MarkedString = string | { language: string; value: string };`\r\n\r\nOf course this can be handled during the conversion between JSON and the specific Java data structures. But wouldn't it be better to drop some flexibility in favor of more explicit typing, so this kind of conversion would not be necessary? For example, with a JSON library such as [Gson](https://github.com/google/gson) most of the protocol parsing and serialization can be done with the generic capabilities of the library, but ambiguities such as those mentioned above require to implement special cases for the respective types."}}
{"actor":{"display_login":"spoenemann"}}