On Mon, Jan 4, 2010 at 8:54 AM, Attila Szegedi <[email protected]> wrote:
> As an implication, if you use a new top-level scope for every script > execution (which you normally do), you'll end up with the cache being > recreated on a per-scope basis. If you use a shared-prototype top-level > scope, you'll avoid this (but then you have to use shared-prototype > top-level scope pattern, which I generally dislike). > This page: https://developer.mozilla.org/En/Rhino_documentation/Scopes_and_Contexts under "Sharing Scopes" states "for our purposes it gives us an easy way to share a set of read-only variables across multiple scopes". Is this section describing the "shared-prototype top-level scope pattern" you dislike? Your drawbacks state it is mutable but the line I cited says "read-only". Perhaps you can describe how it is "non-standard". How would someone writing the JavaScript get tripped up by this? Thanks. -- Daryl Stultz _____________________________________ 6 Degrees Software and Consulting, Inc. http://www.6degrees.com mailto:[email protected] _______________________________________________ dev-tech-js-engine-rhino mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
