Class method addition and replacement (was Re: AOP Compatibility)

Nathan de Vries nathan at atnan.com
Sun Apr 6 20:27:45 PDT 2008


On Sun, 2008-04-06 at 13:07 -0700, Brendan Eich wrote:
> You're doing it again: "wholesale locking down" is false as a general  
> statement, and almost entirely false broken down into particulars.

You're right, "wholesale locking down" is false. However, it is the
migration path for developers who will be using ES4 to its fullest.

> Since you grant use-cases for sealing objects against mutation, are  
> you simply arguing about what the default should be (that 'dynamic  
> class' should not be required to get an extensible-instance factory,  
> that 'class' should do that)?

Yes, dynamic classes seem more in line with my expectations. Perhaps D's
concepts of const/invariant [1] could apply as optional class / member
decorations available to developers with immutability in mind.

> No, because as noted above and copiously documented, ES4 is a  
> superset of ES3.

It's the superset I'm concerned about (and talking about), mainly
because that's the migration path for Javascript developers as I
mentioned previously.

> It seems to me the way forward is to make specific arguments about  
> these proposals, not generalize inaccurately about their being  
> "wholesale" in effect (they aren't), or untraditional (to the extent  
> that JS authors today try to fake it, they are not).

Sure. I'll do my best to do that, keeping in mind that some of the
concepts being discussed WRT language design are outside my field of
expertise.


Cheers,

--
Nathan de Vries

[1] http://www.digitalmars.com/d/2.0/const3.html




More information about the Es4-discuss mailing list