As shown in this table (created by me), all_links does not fit the old/new naming scheme. It should be new_links instead.
Keep the old name as a (deprecated) alias.
As shown in this table (created by me), all_links does not fit the old/new naming scheme. It should be new_links instead.
Keep the old name as a (deprecated) alias.
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Rename all_links to new_links | mediawiki/extensions/AbuseFilter | master | +26 -25 |
Change #1137560 had a related patch set uploaded (by Matěj Suchánek; author: Matěj Suchánek):
[mediawiki/extensions/AbuseFilter@master] Rename all_links to new_links
However, new_links introduces an ambiguity: it could suggest that the variable contains "new links" only, meaning "added links," whereas it actually refers to "all links of the new revision". The new_html, new_text, and new_size variables are less affected by this potential misunderstanding.
I explored alternative approaches using AI but couldn't find a better solution.
In deciding between all_links and new_links, I ended up with the following, which I lean toward:
Since variable names should be intuitive and reduce cognitive load, avoiding misinterpretation tends to take priority in long‑term usability. If the risk of confusion is high, all_links may be the safer choice, even if inconsistent.
My argument is based on the analogy:
Change #1137560 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Rename all_links to new_links