Terminology: named data properties

Rick Waldron waldron.rick at gmail.com
Mon Aug 6 14:10:20 PDT 2012




On Monday, August 6, 2012 at 4:51 PM, Axel Rauschmayer wrote:

> > > On es-discuss, I’ve seen the term “data properties” used for named data properties that are not methods.
> > >  
> > > In this light: wouldn’t it be better to rename named data properties to named value properties?
> > >  
> > "value" usually means scalar, whereas "data" is accurately vague.
>  
> My understanding:
> - Method: a property whose value is a function.
> - Data property: a property that is not a method or an accessor (getter, setter). Example: “ES.next classes don’t let you directly create data properties in prototypes”.
> - Value: the union of primitive values and objects.
>  
>  


What is the endgame? Add more terminology to the spec or try to define a term to be adopted into the spoken lexicon?

The former doesn't currently have any ambiguity and the latter is tough because...  

1. Most devs don't even use the term "accessor", instead they say "getter-setters"  

2. Most devs will use "value" to describe a scalar and "object" or "reference" to describe an object... "data" is used to mean either/both (which is why Brendan's "value objects" makes complete sense: looks like a value, but is actually an object)

3. "method" is the only commonly used term

Rick

>  
>  
> --  
> Dr. Axel Rauschmayer
> axel at rauschma.de (mailto:axel at rauschma.de)
>  
> home: rauschma.de (http://rauschma.de)twitter: twitter.com/rauschma (http://twitter.com/rauschma)
> blog: 2ality.com (http://2ality.com)
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120806/84926042/attachment.html>


More information about the es-discuss mailing list