Bene added a comment.

Counting hints in deprecation notices is not fair, is it?

My stats (using grep) tell me:

- "ByGuid" is used only once in a method name, 
`StatementByGuidMap::getStatementByGuid`. This should be renamed as well to 
`StatementByGuidMap::getStatementWithGuid`
  - Other occurences always are the name of an array or class which does 
indexing by Guid. In this case using "by" is correct.
- "WithGuid" is used 7 times in method names, 3 times in deprecated `Claims`, 2 
times in `StatementByGuidMap` and 2 times in `StatementList`
  - All those methods clearly identify or handle a single statement so in those 
cases using "with" is correct.

(For reference, I used `grep ByGuid src/ -r` and `grep WithGuid src/ -r`)

Some replies:

> I would like to see an external reference for the "grouping vs. selecting" 
> statement.


I think this is obvious but I can search for one.

> I still don't see a problem with "consistency in this [the `StatementList`] 
> class". There is no other occurrence of "ByGuid" or "WithGuid".


However, there are `getWithPropertyId` and `getWithRank`. Furthermore, in 
`StatementByGuidMap` we have `hasStatementWithGuid` and 
`removeStatementWithGuid`.

> I picked the name for consistency with 
> `StatementByGuidMap::getStatementByGuid.`


I'd propose to change that name as well. See above.


TASK DETAIL
  https://phabricator.wikimedia.org/T98180

REPLY HANDLER ACTIONS
  Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign 
<username>.

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Bene
Cc: JeroenDeDauw, Bene, thiemowmde, Aklapper, Wikidata-bugs, aude



_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to