Re: Namespace
| From: | Keryx Web | Date: | Wed, 05 Dec 2007 21:45:21 +0000 |
| Subject: | Re: Namespace | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-33779@lists.php.net to get a copy of this message | ||
Stanislav Malyshev skrev:
Actually I did mention an alternative a while ago, and that would be to learn from ECMAScript 4. This is from John Resigs talks: import dojo.query; import jquery.query; use namespace dojo; query(“#foo”) // using dojo use namespace jquery; query(“div > .foo”) // using jquery No braces, but one is still able to switch from one namespace to another within the same file. As a teacher I think this style would make sense to a newbie. I do not claim that this is the "right" way, though, or that there is such a thing. But it is an option. Lars Gunther+1 for putting namespaces on the backburner and taking the time to get it 100% right ...What's "100% right"? Any proposals (besides braces)?