-
-
Notifications
You must be signed in to change notification settings - Fork 23.7k
Doc: Add "required" qualifier to methods #107130
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
Conversation
|
If you didn't do it I would have, to be honest. |
AThousandShips
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, and has associated tooltips so should be complete
Mickeon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like, this is a fine addition, but I still stand by my prior comment. Perhaps it could be formatted in bold in the built-in class reference?
|
I would prefer "abstract", which is a common term for virtual methods with no default implementation. See also: I wanted to make this a step up from GDScript's abstract methods, since changing the behavior if you didn't implement the required native methods would be a compatibility break. So, looking at it another way, a separate qualifier might make sense too, although it's more confusing and less unified. |
We don't have abstract methods yet, so currently "required" is a soft requirement, hinting that a minimum implementation should at least overwrite these methods to function properly without any error printed, I think. The editor theme & editor help currently does not have the concept of a bold code font. It could be a dedicated PR if appropriate. |
|
To be clear: I don't mind the way you did it initially. The Another difference is that you can't instantiate an abstract GDScript class at all, while you can instantiate Considering that even custom abstract GDScript methods are highly unlikely to make it into 4.5, unifying native abstract methods in 4.5 is out of the question. I think it would be acceptable to introduce the |
|
OK, reverted to the "required" version. It sounds like abstract methods are meant to be implemented as a GDScript functionality rather than core functionality, but we'll see about that later. |
akien-mga
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me. I suggest being a bit more explicit in the message, other suggestions welcome.
dsnopek
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is a really great idea!
|
Thanks! |

Closes godotengine/godot-proposals#9824
Whether a virtual method is required has been marked by #93311. This PR:
requiredqualifier next tovirtualif the method is required.[b]Optional.[/b]and[b]Required.[/b]from the descriptions of related methods.