-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Rename Reference
to RefCounted
#652
Comments
I think I have seen that terminology in some Lua binding library (probably LuaBridge). This means that the term |
I think anything will do!
I imagine reduz would be in favor of a more explicit version. 😉 |
I've also seen RefCounted in other game engines, so it's indeed pretty common. |
Makes sense. The name |
|
I have looked at godotengine/godot#49312 and noticed this: Ref<RefCounted> rc; When we compare this usage against suggested Ref<ReferenceCounted> rc; What looks more readable to you? |
Judging just by that example, I'd say the second is more readable. However, I still believe I'd say it's better to go for |
I'm not sure whether it makes sense to discuss this in isolation, because we're talking about consistency here (even if we don't necessarily have consistency/clarity as of now). I'm mainly talking about:
That said, if there are other occurrences which make it potentially ambigious with I'm also talking from the standpoint of Godot's development principles (the way I see it). I rarely see reduz copycatting names from other game engines. 😛 |
Implemented by godotengine/godot#49312. |
Describe the project you are working on:
This affects engine development rather than projects. Users can still see the name of the class, but won't matter much in projects.
Describe the problem or limitation you are having in your project:
N/A
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
We have a reference-counted base class called
Reference
. That name is confusing, since they are not references, but things that are referred to.The idea is to rename it to
RefCounted
so it describes better what it names and also to avoid hard to understand types in the C++ side, likeRef<Reference>
(what?, a reference to a reference?).Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
class Mesh : public Reference
would becomeclass Mesh : public RefCounted
. Much easier to understand, right?If this enhancement will not be used often, can it be worked around with a few lines of script?:
No.
Is there a reason why this should be core and not an add-on in the asset library?:
Not possible.
The text was updated successfully, but these errors were encountered: