[e-lang] Naming convention for variable holding an eventual reference

Mark Miller erights at gmail.com
Mon May 19 06:35:27 PDT 2008

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
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


More information about the Es4-discuss mailing list