On Jul 15, 2008, at 10:30 PM, Allen Wirfs-Brock wrote:

I’ve up loaded to the wiki a new document titled: “Proposed ECMAScript 3.1 Static Object Functions: Use Cases and Rationale”

It’s available as both a pdf and as a Word doc file:

http://wiki.ecmascript.org/lib/exe/fetch.php?id=es3.1% 3Aes3.1_proposal_working_draft&cache=cache&media=es3.1:rationale_for_e s3_1_static_object_methods.pdf

http://wiki.ecmascript.org/lib/exe/fetch.php?id=es3.1% 3Aes3.1_proposal_working_draft&cache=cache&media=es3.1:rationale_for_e s3_1_static_object_methods.doc

Hi Allen,

Good to see rationales. A few comments:

* No rationale responding to the thread containing this message:

https://mail.mozilla.org/pipermail/es4-discuss/2007-September/ 001114.html

that questions the wisdom of getPrototypeOf. The other rationales are helpful, the lack of one responding to this public thread questioning essentially the same design element is a lack -- what do you think?

* getProperty and getProperties seem misnamed in light of common usage of "get", "[[Get]]", "getProperty", etc. all connoting value- getting, not descriptor-getting. getPropertyDescriptor is a bit long, but not fatally so. Worth renaming?

* Did you consider prototype's Object.extend method:

Object.extend = function(destination, source) {
  for (var property in source)
    destination[property] = source[property];
  return destination;

(see http://www.prototypejs.org/assets/2007/11/6/prototype.js)? It's a commonly encountered "shallow enumerable property clone". John Resig enquired about it being in ES3.1 drafts, but it's not there. Any particular reason why not?


Es4-discuss mailing list

Reply via email to