ES3.1 Object static methods rationale document

Ingvar von Schoultz ingvar-v-s at
Wed Jul 16 19:43:57 PDT 2008

Although I agree that brevity isn't very important here, still
here's a shorter variation on the same names:

     Object.getDescriptor (MyObject, "MyName");

     Object.setDescriptor (MyObject, "MyName", {enumerable: false});


Maciej Stachowiak wrote:
> On Jul 16, 2008, at 2:36 PM, Allen Wirfs-Brock wrote:
>> Just wait, "reify" may yet end up as the last name standing...
> Methods don't reify things, the language definition does. Property  
> descriptors are reified in ES3.1 whether or not you ever call the  
> method.
> I think getPropertyDescriptor is the best name suggested so far, it  
> has no chance of being confused for a method that would get the  
> property value, and it does not use obscure CS jargon in an incorrect  
> way. I don't think brevity is critical for these metaprogramming/ 
> reflection type methods - they are not the kind of thing that will be  
> commonly used by most programmers. Mostly they will be used by  
> frameworks such as Ajax libraries or secure language subsets.
> Regards,
> Maciej
>> -----Original Message-----
>> From: es4-discuss-bounces at [mailto:es4-discuss-bounces at 
>> ] On Behalf Of Brendan Eich
>> Sent: Wednesday, July 16, 2008 2:27 PM
>> To: David Flanagan
>> Cc: es4-discuss at es4-discuss
>> Subject: Re: ES3.1 Object static methods rationale document
>> On Jul 16, 2008, at 1:41 PM, David Flanagan wrote:
>>> Brendan, I think you were correct when you originally wrote:
>>>> lookup : define :: get : put.
>>> I think that lookupProperty is much nicer than describeProperty,  
>>> since
>>> "lookup" captures the getter nature of the method in a way that
>>> "describe" does not.
>> Connotations are many, ambiguity without a noun phrase (not just
>> overloaded old "property") saying what's being "got" or "described"
>> or "looked up" is inevitable. This means the stolid, safe name
>> "getPropertyDescriptor" is least likely to confuse.
>> I see what you mean about describe in the context of setting a
>> description (depict in a graphics context is problematic too) --
>> thanks. Thesaurus doesn't include mental concept filtering, dammit.
>> I'm sure we'll get this right, but I'm also pretty sure "getProperty"
>> isn't the droid we are seeking.
>> /be
>> _______________________________________________
>> Es4-discuss mailing list
>> Es4-discuss at
>> _______________________________________________
>> Es4-discuss mailing list
>> Es4-discuss at
> _______________________________________________
> Es4-discuss mailing list
> Es4-discuss at

Ingvar von Schoultz

------- (My quirky use of capitals in code comes from my opinion that
reserved and predefined words should all start with lowercase, and
user-defined should all start with uppercase, because this will easily
and elegantly prevent a host of name-collision problems when things
like programming languages are upgraded with new labels.)

More information about the Es4-discuss mailing list