2011/1/19 mckoss <[email protected]>: > I've been using a namespace pattern I developed and would love to get > feedback on my implementation/design. I know there is some wheel re- > invention here - I just have not yet found other patterns I like as > well.
There may be a reason for that. > My goals were to create something that felt very close to python > modules, and be natural in the JavaScript world. [examples] This is where the problem starts. The main issue here is that even the word namespace creates a false illusion, that Javascript can be treated similar to other languages. The hierarchically construction is quite appealing I can't argue that, but it's very inefficent to use deeply nested chains of objects. They come with a cost because of the way they work (property lookups). The biggest problem here isn't the tools/libraries, but the people who tend to misuse them. Recommended reading: http://peter.michaux.ca/articles/javascript-namespacing - Balázs -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/[email protected]/ To search via a non-Google archive, visit here: http://www.mail-archive.com/[email protected]/ To unsubscribe from this group, send email to [email protected]
