Hi,

On 11/10/2012, at 3:04 PM, ext Thomas McGuire wrote:

> the QML engine "freezes" the global JS object. This is apparently(?) to 
> prevent accidental writes to the global object. For those who don't know, the 
> global object in JS provides objects and properties available in global 
> scope, 
> such as "console" (for console.log) or "qsTr".

In addition preventing the common errors that a mutable global object causes 
(try running common JS libraries and see how many of them accidentally modify 
the global object because they forgot to put a "var" somewhere), a mutable 
global object would prevent QML from optimising any bindings as it cannot be 
sure of the names in any given scope.

Cheers,

Aaron

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to