Strip "new_" prefix from constructor functions #372
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
java
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
java-gi/java-gi!372
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "new-functions"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Java-GI has, since a long time, renamed constructors from "new_with_some_property" to "with_some_property", stripping the "new_" prefix. However, there are also some functions (static methods in Java) that act as factories for new instances, that use this naming scheme. With this PR, these functions are also renamed.
Because in some cases, the "new_" prefix actually improves the name, only functions starting with the following prefixes are renamed:
new_for_...new_with_...new_build_...new_take_...andnew_takenew_from_...Warning: The old methods are removed! Generating deprecated fallbacks would be a rather large change, and even though this could break some existing code, the fix will be very simple.
The following methods will been renamed with this change:
e8009d276ctob649c9adb8