Heh. The possibilities I see for its use are to protect the global object from extraneous modification and tracking changes to the global object.
Server-side implementations can have some interesting issues when arbitrary user code is allowed to execute. I'm thinking of an MVC situation where the templates are written by users and contain JavaScript. Tools like JSLint and JSHint are great for us developers, but a production/creative person may not see the benefit from those sorts of tools. Another issue that comes up on this list from time to time is the ability to "reset" the global object between requests in a server-side HTTP scenario. If you can track changes made during one request, you can undo them between requests. You can also enforce certain policies, like "only approved frameworks can store to the global object." Or you can implement monitoring tools to discover global usage patterns while an application is running. But I'm sure there are horrible things that people can do as well. On Friday, July 13, 2012 1:34:43 AM UTC-7, Andreas Rossberg wrote: > > On 12 July 2012 20:27, Michael Schwartz <[email protected]> wrote: > >> What would really rock is if you could proxy for the global object. >> > > *shudder* I fear that this will, in fact, be possible at some point, and > I already cringe at just thinking of the perverted ways programmers will > sure find to abuse that feature. ;) > > /Andreas > > -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
