I want to discuss with my boss a part of this code - so I need a name for it.
items = array.map(function(item){
return item.item;
});
I want to say "This usage of the same identifier twice is _______________ and confusing."
They might respond "No this is _________ which is fine".
Is tautology an accurate word to use there?
the saying of the same thing twice over in different words, generally considered to be a fault of style
The use of item in the function call e.g., function(item) could be named anything you want, so instead you could have:
items = array.map(function(data){
return data.item;
});
What is this called if not tautology?
Edit:
A non-programming example, would be naming a street Road Street, or worse naming an area in London, London (perhaps New York New York would also work).
thing.thingorfoo.foo. – AncientSwordRage Aug 10 '16 at 10:58