On Aug 1, 2012, at 3:44 PM, Brendan Eich wrote:

> Allen Wirfs-Brock wrote:
>> I suspect we will get around to having some level of syntactic support for 
>> defining these things so I'm more concerned about how we talk about them 
>> (ie, the name of the language feature)  then I am about what what has to be 
>> typed in source code and possible source code name conflicts.
>> 
>> From that perspective, a fairly unusual noun that is unlike to be confused 
>> with application domain concepts would be ideal.
>> 
>> One possibility is :  moniker
> 
> /n./ /Slang/
> A personal name or nickname.
> 
> Nope.

string /n./ 
1. a thin length of cord, twine, fibre, or similar material used for typing, 
hanging, binding, etc.
2. a group of objects threaded on a single strand
3. a series or succession of things, events, acts, utterances, etc.
...

In appropriating nouns for reassignment to technical concepts we aren't looking 
for words whose every-day meaning is an exact match to the technical concept. 
Instead we look for words whose common meaning has enough conceptual 
relationship to the concept such that it aids in learning and communicating 
about the technical concept.  Otherwise, we could just uses unique gibberish 
words.  

"Moniker" is conceptually close enough to be helpful, but doesn't have many 
conceptual implications that are likely to cause confusion between its normal 
English meaning and the technical concept.

> 
>> Microsoft COM
> 
> You lost me right there :-P.

Arguably, JS's object model is closer to COM's then it is is to a lot of other 
things...

> 
>> uses that term for a different but somewhat similar abstraction.  Other than 
>> that usage, which seems benign, moniker seems unlikely to carry other 
>> unwarranted technical implications.
>> 
>> Consider:
>>  "A property key is either a string or a moniker"
> 
> I agree that "Name" here is confusing when one reads aloud, because the 
> capital N and code font are not voiced. However in print, Name can work as 
> well as Symbol or other terms.
> 
> It would be awkward to have only compound names such as UniqueName and 
> PrivateName.
> 
> Hacker jargon such as a nouned "gensym" would be as distinctive, if not 
> moreso, and better yet, well-employed compared to "moniker".

Gensym has hacker cred. but most JS programmers aren't hackers. Moniker is 
easier to explain:

Daddy, whats a "Moniker"?
It's a unique object that can be used as a property name.

Daddy, what's a "Gensym"?
It's a unique object that can be used as a property name. "Gensym" is short for 
"Generated symbol" and was first used in Lisp to name the the  built-in 
function that could be used to generate unique symbolic names. Among Lisp 
programmers "gensym" also came to mean any value generated by the gensym 
function. In JavaScript we don't generally use the term "symbol" but unique 
non-string property keys are conceptually kinda similar to Lisp gensyms so we 
decided to use the same name.  Isn't hacker culture cool! 


Allen
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to