optionals #106
migueldeicaza
started this conversation in
General
optionals
#106
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently almost all APIs that expose classes expose those as non-optional.
Say, Godot does not include any information about which parameters can be nil or which return values can be nil.
There are a couple of special cases in the api that are handled, but I think I will need to have a side file that describes every parameter and return value and its nullability status.
I suspect an easy change is to allow optional values for now on the parameters and over time start annotating the results as being non-optional.
Not sure about the return values, that would have a deeper impact on the user code. I suspect this might be the place to focus on to reduce churn on the user code/
Beta Was this translation helpful? Give feedback.
All reactions