Aktuelle Änderungen
Printable View
Änderungen
Bearbeiten
Python3000 > SourceSafe > Middleware > Reflection > ReflectionAndIntrospection > ActorModel > NamespacesClear Trail
OrganizingFunctionalCode
- http://en.wikipedia.org/wiki/Namespace_(computer_science)
- A namespace is an abstract container or environment created to hold a logical grouping of unique identifiers or symbols (i.e., names). An identifier defined in a namespace is associated with that namespace. The same identifier can be independently defined in multiple namespaces. That is, the meaning associated with an identifier defined in one namespace may or may not have the same meaning as the same identifier defined in another namespace.
- http://jnb.ociweb.com/jnb/jnbMar2009.html#Namespaces
- http://stuartsierra.com/2006/07/13/the-naming-of-namespaces
- As languages got more complex, adding first-class functions and first-class types, there were more and more things that needed to be called by the same name. Few programming languages picked up the idea of meaning based on context. So hierarchical namespaces were born:
java.awt.event.ActionEvent myEvent = new java.awt.event.ActionEvent();
- Common Lisp to the rescue! As many have pointed out, CL is not just a Lisp-2 (functions and variables in separate namespaces), but more of a Lisp-n. It has many overlapping namespaces — functions, variables, type specifiers, block names, tagbody tags. With a few macros and a hash table, one can easily add a new namespace to the language.
- http://osteele.com/archives/2004/08/whats-in-a-namespace
- In fact, a Java class definition defines more than one namespace. One namespace is the namespace of fields of that class. Another is the namespace of class methods. A Java class A can therefore define both a field named A.year, and a method named A.year. This is in contrast to Python, where a method is a particular kind of attribute (the Python name for “field”) — fields and methods belong to the same namespace. (This also illustrates the difference between the space of names and the space of referents for those names.
- Namespaces in programming languages solve two problems.
- One is the tendency to run out of meaningful identifiers within a package controlled by a single owner.
- The other is the problem of packages controlled by multiple owners.
Clojure