Terminology for 'things'

Here you can talk about anything related to BBC BASIC, not covered in another category
Richard Russell
Posts: 457
Joined: Tue 18 Jun 2024, 09:32

Terminology for 'things'

Post by Richard Russell »

Just putting this out there, you may not agree.

I tend to refer to arrays as having elements, structures as having members and lists as having items (I can't guarantee that I have been consistent in the BBC BASIC documentation; if you do notice a departure from this usage please tell me).

I asked DeepSeek whether this was reasonable, and it replied that it was (!). But it suggested a more precise classification:
  • Elements for anything indexable.
  • Members for things with a name.
  • Items for unordered collections.
This would suggest using elements rather than items for ordered lists, but I prefer to maintain the distinction from arrays.

Other similar terms which may be encountered are fields (common in databases), nodes (common in linked-lists) and values (common in dictionaries, especially in the context of key-value pairs).