Skip to content
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

Renaming get_current_animation_position to get_pos #14926

Closed
DimaKiva opened this issue Dec 22, 2017 · 3 comments
Closed

Renaming get_current_animation_position to get_pos #14926

DimaKiva opened this issue Dec 22, 2017 · 3 comments

Comments

@DimaKiva
Copy link

DimaKiva commented Dec 22, 2017

Godot version:
Godot 3.0 Beta 2

Issue description:
get_current_animation_position()
Are you seriously?
I was waiting for the compactness get_pos()
current and animation they and so will be visible from the operated in front of the point

@akien-mga
Copy link
Member

akien-mga commented Dec 22, 2017

First of all, I would suggest that you phrase your proposals in a more constructive manner. That's no "hellish syntax", that's a very personal opinion that you have on how the Godot API should be like, not a "bug". You could have phrased it "Renaming get_current_animation_position to get_pos" and left away the rant.

Now to the actual rant, Godot's API is always very descriptive. We changed get_pos to get_position in 3.0, and many other such changes as with autocompletion, characters are cheap, and we feel that clearer method names make for self-documenting code.

Regarding this specific method, I don't have a strong opinion. The name has to be different from get_position though, to prevent conflict with 2D and 3D node positions. And AnimationPlayer.get_position() doesn't make much sense, as it's the playback position of the currently playing Animation that you're retrieve (and that's a different object).

@akien-mga akien-mga changed the title 3.0 beta2 hellish syntax detected Renaming get_current_animation_position to get_pos Dec 22, 2017
@ghost
Copy link

ghost commented Dec 23, 2017

I prefer keeping it get_current_animation_position() for these reasons:

  • IMO it's not used often enough to justify renaming. Having descriptive method names would be better.
  • I know exactly that you're talking about AnimationPlayer despite the suboptimal issue description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@akien-mga @groud @DimaKiva and others