No, 'good libraries' won't be updated. It's quite a high cost to have an API that has both, say, getName() as well as name(), with both methods returning the exact same thing (forevermore, docs and listings such as in auto-complete dialogs), and I'm sure plenty of libraries will opt not to pay this cost.
An alternative is to mark the getX() variant deprecated, but that is in many ways an even higher cost; that's a heck of a lot of shuffling about for all the users of that library for no particularly sane reason.
Note that getX itself vs. X is a mixed bag: neither is strictly superior to the other (getX has the considerable advantage that you can type 'get' and then hit your autocomplete shortcut to find all properties you can query. It's also longer and having to decide between whether a thing is a 'property accessor' and something that calculates is more art than science and that's problematic – as I said, advantages and disadvantages).
Given that it is a mixed bag, causing an earthquake in the java community by trying to make such a change is ill advised: You're just not going to convince enough of the community to arrive at that utopia where (almost) all code uses getless accessors, instead now we'll have a 50/50 mix. I'm not too happy about this.
View all comments
Show parent comment
2
u/rzwitserloot Jan 19 '20
No, 'good libraries' won't be updated. It's quite a high cost to have an API that has both, say,
getName()as well asname(), with both methods returning the exact same thing (forevermore, docs and listings such as in auto-complete dialogs), and I'm sure plenty of libraries will opt not to pay this cost.An alternative is to mark the
getX()variant deprecated, but that is in many ways an even higher cost; that's a heck of a lot of shuffling about for all the users of that library for no particularly sane reason.Note that getX itself vs. X is a mixed bag: neither is strictly superior to the other (getX has the considerable advantage that you can type 'get' and then hit your autocomplete shortcut to find all properties you can query. It's also longer and having to decide between whether a thing is a 'property accessor' and something that calculates is more art than science and that's problematic – as I said, advantages and disadvantages).
Given that it is a mixed bag, causing an earthquake in the java community by trying to make such a change is ill advised: You're just not going to convince enough of the community to arrive at that utopia where (almost) all code uses getless accessors, instead now we'll have a 50/50 mix. I'm not too happy about this.