-
Notifications
You must be signed in to change notification settings - Fork 8
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
[Godot] Add access modifiers, private and public, to GDScript #7
Comments
I shouldn't have write the full links here. Gosh, under the orignal pr and proposal can be found this proposal. 😒 |
I'll be following this one |
Access modifier is a heavy topic and will be increasing the complexity of the language. This access modifier has been debated for and against it in the original proposal, Moreover, I would like to see how the annotations will work, as part of the language. It is just cryptic here in the proposal and original proposal did not clarify. I doubt you are planning to implement full-fledged access restrictions in the language. Need to understand more. I hope it will not impact performance of the game during runtime, given GDScript is running slower than C#. |
As a technical game designer, who works a lot with other game designers who aren't good at programming, I really want to have some access specifiers. They really helps to create safe environment for people, who can experiment with my tools and mechanics with less risk to break something. I would say, it would be great to have, at least, public and protected variables and functions. In my experience working with Unreal Engine I use them most of the time. |
Describe the project you are working on
Original proposal: godotengine#641
Original pull request: godotengine/godot#98136
Linked PR: Redot-Engine/redot-engine#734
Describe the problem or limitation you are having in your project
According to the original proposal, "_" as access modifier is ok for properties, but confusing for methods when it comes to "being
private
/protected
" or "beingvirtual
". Check the original proposal for the rest info.Describe the feature / enhancement and how it helps to overcome the problem or limitation
Currently, I posted a pull request about adding
@private
and@protected
annotations to achieve this as annotations are easy to be implemented than keywords. However, based on what dalexeev said, annotations is handled later than keywords. So I then added two reserved word versions of the annotations, which are now reserved for implementation. Check the original pr for more detailsDescribe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Check the original pr.
If this enhancement will not be used often, can it be worked around with a few lines of script?
No, because this is related to source code
Is there a reason why this should be core and not an add-on in the asset library?
The same answer as the previous question
The text was updated successfully, but these errors were encountered: