S
Stanimir Stamenkov
Mon, 26 Jul 2010 15:26:53 +0300, /David Mark/:
In my initial post I've written: "use a global variable acting as
namespace". Do you think the given wording is confusing?
In C++ and Java classes act as namespaces for their static members,
for example, but classes are not namespaces. Java also doesn't have
namespaces but packages. I think most people are aware, number of
concepts are established differently in different programming
environments.
... They should also understand that there is no such thing
as a "namespace" in JS. It's a global variable referencing an
object. Calling it something else implies that it is somehow
different from all other native objects, which it is not. That's
where the confusion starts.
In my initial post I've written: "use a global variable acting as
namespace". Do you think the given wording is confusing?
In C++ and Java classes act as namespaces for their static members,
for example, but classes are not namespaces. Java also doesn't have
namespaces but packages. I think most people are aware, number of
concepts are established differently in different programming
environments.