You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment the language server doesn't do strict checks on class fields for nil. Whether you specify it as optional or not, the value of fields may be unset.
However, I believe that the information about whether it is necessary to check for nil before working with the field or not is important and we should explicitly indicate this.
Example:
---@classmt.PointedThing---@fieldtypestring MUST EXIST---@fieldundermt.Vector|nil CAN BE NIL
What is your opinion on this matter?
We should always specify optional fields and strictly track them.
50%
Specifying optional fields is helpful, but not required.
50%
We don't need to make things difficult for ourselves.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
At the moment the language server doesn't do strict checks on class fields for nil. Whether you specify it as optional or not, the value of fields may be unset.
However, I believe that the information about whether it is necessary to check for nil before working with the field or not is important and we should explicitly indicate this.
Example:
2 votes ·
All reactions