-
Notifications
You must be signed in to change notification settings - Fork 175
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
devel_glfw3.1: incorrect renaming of Char to Character? #105
Comments
I don't remember the reasoning behind it but it seems inconsistent with GLFW API. My guess is that, fully spelled version is more Go-like and readable. If there is strong opinion to follow GFLW API strictly I'm not against it. |
I see. Thanks for the prompt response!
My main argument is that, unless there is a good reason, it is a needless place where someone who has used the C API (or any other language bindings, I guess) would possibly trip. |
I think it's better just to keep the spelling the same as GLFW C library. Unless there are very pressing (more so than just better sounding name) reasons to do otherwise. |
I will make a PR that changes the naming to be consistent with GLFW names. Let me know if there are any objections, but I think that's the best thing to do. |
Just a thought,
Isn't that unlikely since Go is statically typed, and there's godoc.org and likely autocompletion available? If someone tries to write
Then they'll go godoc.org and see that it's called something else. Or, more likely, they'll be looking at godoc.org to begin with (how else do they have a Nevertheless, I still believe sticking with original upstream API func names where possible is simpler/better. Even if resolving this inconsistency is easy, it's better if it doesn't exist in the first place. Also, porting code will be easier as there'll be less manual/irregular changes. Making a PR to close this issue now. |
Closing this as the PR has been merged into the |
This adds a breaking API change by renaming `SetCharacterCallback` to and `SetCharCallback`, and `SetCharacterModsCallback` to `SetCharModsCallback`. Updating is easy thanks to static type checking, and can be automated with `gofmt`: gofmt -w -r 'x.SetCharacterCallback -> x.SetCharCallback' *.go gofmt -w -r 'x.SetCharacterModsCallback -> x.SetCharModsCallback' *.go Closes #105.
It looks like we renamed these functions spelling out Char as Character.
For example
glfwSetCharCallback
->SetCharacterCallback
spelled out fully. We did it withSetCharacterModsCallback
too.This isn't a big deal but it seems rather inconsistent I think. What say you guys?
The text was updated successfully, but these errors were encountered: