-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
(suggestion) Convert sdl.Rect Fields from int32 to int #600
Comments
Hi @Priff13, it was done to keep compatibility with SDL2’s native C integers. Would you happen to have a suggestion on how to make the fields int and keep them compatible? |
@veeableful, the way that I would go about it is like this:
I see that the function
In the rest of the cases where It's not an insignificant amount of changes, but I believe that it would be overall beneficial for the developer experience. PS: Applying the same changes to |
Thanks @Priff13. I think I will have to postpone it due to the amount of effort that it would require for me to maintain by myself but if you would like to create a pull request, it would be greatly appreciated! |
Hi, According to W3schools, on 64-bit architectures, golang's int is 64 bits wide, whereas, int32 is always 32 bits. If the Golang SDL API accepts Coercing the value from Having Using IMHO I feel like the benefits of compatibility (keeping int32 instead of int) outweigh the benefits of readability. Best regards, |
Would you mind converting the
sdl.Rect
field types fromint32
toint
?This would help code readability when defining new rectangles.
The text was updated successfully, but these errors were encountered: