Complete Minimal Classes
khs4473 at gmail.com
Fri Apr 6 13:27:26 PDT 2012
Looking at Allen's collection classes, it's clear that our maximally
minimal classes aren't sufficient for describing a large subset of the
classes we might want to create. As a general goal, I think that a
complete class syntax should be able to express all of the external
interface of the class, for all except a small set of edge cases. I
believe the following features are missing:
1) A way to add methods to the constructor.
2) A way to add arbitrary properties to the constructor.
3) A way to add arbitrary properties to the prototype.
I'd also like to add a fourth feature:
4) The ability to separately define the [[Call]] and [[Construct]] behavior
of the constructor.
I've created a couple of gists with a variant of our minimal classes which
is intended to provide these features:
I've used "static" as a keyword. I know it's a misnomer - but it's not too
bad as misnomers go. I've also left out private members and private names,
as IMO they are an orthogonal concern.
Let me know what you think - and thanks for your time everyone!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss