In ECMAScript 4 however, objects that at instances of classes cannot by default be modified during runtime. You can allow this by using the dynamic attribute on the class declaration.
dynamic class A { var b = 1; } var a = new A; delete a.b; // removes the property a.c = 10; // add new property
Note that the type-checker cannot warn you if you access dynamic properties which might change or be deleted at runtime.
Built-in classes as Object, String etc. are defined as dynamic out of the box.
