Closed elfring closed 8 years ago
@elfring if you want, you can fork it and fix the identifiers and send us a pull request with the fix. That would be a great help.
Will a renaming of such identifiers affect also the application binary interface for this software?
libmypaint is written in C, and loosely conforms to the C99 standard. Why are you asking for this?
@elfring We'll have to consider API consistency more carefully than we do in future. ABI consistency is less important IMO.
A bit more context would help us understand the issue you are having. What problems is are this naming causing you?
Otherwise, for now, I'm not sure if this is an issue we need to fix, frankly.
Why are you asking for this?
I imagine that more software release planning would be needed if you care for API/ABI stability around affected identifiers.
What problems is this naming causing you?
How do you think about to avoid that this software depends on undefined behaviour?
Hit me with practical suggestions about how we can improve things, tell me what's actually going wrong, or (better still) make PRs to fix dud behaviour please.
We can also consider automated tools as suggested in #46.
Still no practical suggestions or error messages from the reporter. Our codebase seems to be merely doing this to avoid confusing struct Foo
and Foo
types though, which is silly.
Picking this up for the release for another look. There are structures which probably should go private just for the sake of cleaning up the interface.
@elfring Tell me what problems this is causing you, or give me a concrete way of testing this. Compiler error messages, test cases, anything. Better still, send a PR.
Would you really like to "test" undefined behaviour? ;-)
@elfring Yes please. Suggestions for linters, compiler flags, or similar checks.
As if I haven't already, you mean?
Thanks for the link to the ubsan information on the RedHat blog. Looks as if it could be useful, but I note one of the comments on the post:
Most GNOME projects are maintained or contributed to by Red Hat and the use of reserved identifiers is pervasive among those projects. By pervasive, I mean close to 100% of GNOME projects do it and many of the examples in the documentation do too. It’s almost like some kind of style guide there.
Dunno if our use of GLib or GI will be a problem there.
Thanks for your source code improvement.
I would like to point out that identifiers like "
_MyPaintSurface
" and "_OperationQueue
" do not fit to the expected naming convention of the C++ language standard. Would you like to adjust your selection for unique names?