-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why members of CompletionItem are pointers? #29
Comments
Because they are optional. The This should definitely be documented better... |
Have you considered using an optional type?
|
The project started before generics were available. It is definitely possible to switch, but ... for what it's worth, Go has nils. (Terrible design decision.) And nils are very often used for exactly this semantic intent. I don't love it, but it's common practice in Go (and other null-enabled languages) and I think changing this now may annoy current users of this library. |
I'm ok with it! |
Thank you for the discussion, it's useful. I'm not opposed to changing in the future. I will re-open this as an issue to document the use of nils, at the very least. |
Thank you too. |
What's the reasoning behind some
CompletionItem
members likeKind
,Details
,Deprecated
,Preselect
, etc... are defined as pointers?The text was updated successfully, but these errors were encountered: