On Sat, May 17, 2008 at 7:12 PM, David-Sarah Hopwood
<david.hopwood at industrial-designers.co.uk> wrote:
I wrote:
Suppose that _$post, _$get, _$when etc. were defined on Object.prototype,
and [...]
In other words, make these "final" methods of Object. A more general
mechanism for final methods would be of no use in ES3 because it is
untyped, so you couldn't rely on any given object being of a class/type
that defines a method as final.
ES3 already conflates read-only with do-not-override. In order for
ES3.1 to remain compatible, it must be able to impose both
constraints, but it can unbundle them. There is no issue with
static-vs-dynamic typing. An object is born with an immutable
prototype chain. It there's a non-overridable property 'foo' already
on its prototype chain, then it can't get its own 'foo'. Assuming this
goes into ES3.1, it can eventually go into Caja as well.
On Sat, May 17, 2008 at 7:12 PM, David-Sarah Hopwood
<david.hopwood at industrial-designers.co.uk> wrote:
> I wrote:
>> Suppose that _$post, _$get, _$when etc. were defined on Object.prototype,
>> and [...]
>
> In other words, make these "final" methods of Object. A more general
> mechanism for final methods would be of no use in ES3 because it is
> untyped, so you couldn't rely on any given object being of a class/type
> that defines a method as final.
To my great surprise
<https://mail.mozilla.org/pipermail/es4-discuss/2008-May/002891.html>,
ES3 already conflates read-only with do-not-override. In order for
ES3.1 to remain compatible, it must be able to impose both
constraints, but it can unbundle them. There is no issue with
static-vs-dynamic typing. An object is born with an immutable
prototype chain. It there's a non-overridable property 'foo' already
on its prototype chain, then it can't get its own 'foo'. Assuming this
goes into ES3.1, it can eventually go into Caja as well.
--
Text by me above is hereby placed in the public domain
Cheers,
--MarkM
On Sat, May 17, 2008 at 7:12 PM, David-Sarah Hopwood <david.hopwood at industrial-designers.co.uk> wrote:
To my great surprise mail.mozilla.org/pipermail/es4-discuss/2008-May/002891.html,
ES3 already conflates read-only with do-not-override. In order for ES3.1 to remain compatible, it must be able to impose both constraints, but it can unbundle them. There is no issue with static-vs-dynamic typing. An object is born with an immutable prototype chain. It there's a non-overridable property 'foo' already on its prototype chain, then it can't get its own 'foo'. Assuming this goes into ES3.1, it can eventually go into Caja as well.