Assigning to ReadOnly properties
brendan at mozilla.org
Mon Nov 12 16:25:36 PST 2007
On Nov 12, 2007, at 4:01 PM, Mark Miller wrote:
> To fix delete within this constraint, "delete <whatever>" in Caja
> either return true or throws.
At this point, either ES4 slides down the slippery slope a bit and
courts migration pain that holds it back (we really do expect most
pages on the web today to work if shipped as application/
we need a better pragma story.
We could support
use DeleteError, ReadOnlyError
and encourage users to litter their new code with this line at the
top. There's good precedent from Perl and other languages for a
at the top. But the Errors are a mouthful and eyeful. Since I just
mentioned strict mode, I'll note again that the single runtime
semantic change strict mode causes from standard mode (assuming the
program passes strict mode's type checker and lint-like sanity
checker) is a change to eval: strict mode results in a different
runtime eval, such that eval cannot create bindings in its dynamic
scope. We could slide down *this* slope a bit by adding DeleteError
and ReadOnlyError exception behavior to 'use strict'.
Comments welcome, but you're probably in favor of opt-in versioning
making all of these changes implicitly ;-). Or perhaps a 'use Caja'
More information about the Es4-discuss