Naming variables is quite important and being a non-native English speaker I wonder what the difference would be for using element, item and entry to name things within data structures or variables/parameters.
Let us start with the plain English meaning of each of these:
abstract
, especially one that is essential or characteristic.
Thus, they can be thought of logically connected atomic parts of a whole. E.g. Elements(Nodes) of a Tree, Elements of a
HTML
code(Opening tag,InnerHtml
content and Closing tag)
I prefer this when the thing are logically independent like Items in a Shopping cart, Items in a bag, etc
I usually use this for tables like Hash Table or Accounts(Transaction entry) or Records(recording entries in sales, etc.)
Now we can't refer the items in a bag(considered as an Object in Object oriented paradigm) as entries or elements(probably not elements because the items as not constituents of the bag itself).
However, in some cases like an array we can use the element or item or entry interchangeably too :)