Skip to content
This repository was archived by the owner on Feb 26, 2022. It is now read-only.

Bug 736281 - Implement namespace inheritance.#375

Merged
Gozala merged 2 commits intomozilla:masterfrom
Gozala:bug/ns-inherit@736281
May 17, 2012
Merged

Bug 736281 - Implement namespace inheritance.#375
Gozala merged 2 commits intomozilla:masterfrom
Gozala:bug/ns-inherit@736281

Conversation

@Gozala
Copy link
Contributor

@Gozala Gozala commented Mar 16, 2012

I have blogged about namespaces today, where I outlined one annoying limitation that namespaces have in contrast to private names which is this:

let { ns } = require('namespace')
let internals = ns()

let base = {}
internals(base).secret = 'I love JS'

let decedent = Object.create(base)
internals(base).secret // => undefined

With this change last line will return 'I love JS', which I think is more intuitive!

@ghost ghost assigned ochameau Mar 16, 2012
@Gozala
Copy link
Contributor Author

Gozala commented Mar 16, 2012

@ochameau no rush on reviewing this!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why 'frame'? also i'd prefer that the name explicitly indicated it's a namespace.

@Gozala
Copy link
Contributor Author

Gozala commented May 4, 2012

@autonome I have decided to wait until we could remove workaround for bug 673468, as most of the code was doing it. Now that this workarounds can be removed (will be done by #429), I think it's ready for another round. Also keep in mind that in the diff you'll see changes from #429 as well since that's where this branches out from (of course you're welcome to review both). You could see only diff for this patch here https://github.com/Gozala/addon-sdk/compare/bug/ns-workarounds@751584...bug/ns-inherit@736281

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/decedents/descendants/ here and elsewhere

Gozala added a commit that referenced this pull request May 17, 2012
fix Bug 736281 - Implement namespace inheritance. r=@autonome
@Gozala Gozala merged commit ad8c75e into mozilla:master May 17, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants