Reference to 'namespace', in Namespace - Wikipedia:
In computing, a namespace is a set of symbols that are used to organize objects of various kinds, so that these objects may be referred to by name. Prominent examples include:
- file systems are namespaces that assign names to files;[1]
- some programming languages organize their variables and subroutines in namespaces;
- computer networks and distributed systems assign names to resources, such as computers, printers, websites, (remote) files, etc.
I could grasp the idea of referred to by name and understand name,
Nevertheless, I struggled but failed to distinguish 'namespace' and 'name',
what's the space in 'namespace'?
bar()
andbaz()
, and you put them into the class definition for thefoo
class, then - in many programming languages - they would be automatically placed within the class's namespace, becomingfoo.bar()
andfoo.baz()
. See how the namespace became the prefix and the names became the suffix of the qualified name? – Apr 07 '18 at 03:04