Subj : Re: Namespaces To : Berserker From : Brendan Eich Date : Tue Oct 11 2005 03:20 am Berserker wrote: > How can I implement namespaces in spidermonkey? > I need to have a sintax like this: > > var file = new core.io.File(); That is not an example of namespaces, just an object, referenced by the name core in the scope chain in which that line is evaluated, containing another object, io, which contains a constructor function, File. You can do all of this with JS_DefineObject and JS_InitClass. Namespaces are values that can be used on the left of the :: operator to qualify a local name or expression in E4X. They turn up in Edition 4 of ECMAScript, aka JavaScript 2, as well. /be .