Because programming would be hard enough if we had good names for things.
I mean seriously.
For an activity that requires such relentless, fastidious precision of its practitioners,
it's miraculous we can even communicate at all.
If you've ever tried teaching programming to beginners, maybe you've noticed.
Or maybe this is the first time you're deliberately considering
how overloaded our terms of art are,
and are maybe surprised by what you find.
Either way, welcome!
Hope you find this interesting,
and please feel welcome to contribute.
Note: documentating != proposing replacement
Without further ado:
term
meanings
issues
key
unique value allowing efficient lookup
of associated values (e.g. in a map,
datastore, etc.)
(non-unique) attribute of data in a
collection by which it can be ordered,
grouped, etc.
a secret value used for
encryption/decryption/authentication
a public value used for encryption and
authentication
overloaded, difficult to google
the metaphor works for symmetric key crypto
("only those with the key can lock/unlock
access") but only causes confusion for public
key crypto ("I give my key out to everyone?")
value
the value that a key (e.g. in a map)
is associated with
any data (e.g. that can be stored
in a variable)
overloaded, difficult to google
set
to assign a value
a collection of unique elements
overloaded, difficult to google
map
to apply a function to a collection of
of elements
a data structure associating keys with
values
overloaded, difficult to google
class
type
object
heap
a pool of memory managed by an
allocator
a type of tree-based data structure
overloaded, difficult to google because a
heap-tree is typically allocated on the heap,
and a memory heap is itself implemented with
some sort of a data structure
constant
a hard-coded value or 'magic number'.
typically a literal expression.
possibly even a value computed at
compile-time ('constexpr')
an attribute of an access path to a
value, through which the value cannot
be modified. However the value itself
might be mutable
if you have a 'constant', it would be
reasonable to assume that its value will
remain constant, rather than being
inadvertently modified by some other piece of
code which holds a mutable reference to the
data.