> "beget" sounds very much like what we want, but I just wanted to raise a
> point about understanding and adoption, especially for the language of
> the web.
I wouldn’t worry, all of a programming language is new vocabulary, anyway. You
always have to learn semantics, so learning a new word (especially one that
increases your English vocabulary) shouldn’t be a problem. My worry is more
that it doesn’t read like a sentence. I would prefer
const Employee = Person begets { ... };
I think Java got it right with extends:
class Employee extends Person { ... }
> What about 'protofor'?
> let obj = base protofor {a: 1, b: 2}
> let arr = base protofor [p, q, r]
> let fun = base protofor function (...args) { ... }
> let re = base protofor /(\w+)\s+(\w)+/g
>
> Once again, for the specific case of functions, the proto operator has a
> semantics that goes way beyond setting the [[prototype]] internal
> property. Maybe 'protofor' for the [[prototype]] and 'beget' for the
> constructor-related semantics?
Even though it contradicts my previous rules, I still tremendously like
“proto”: It does not create new vocabulary and has an operator-y feel to it.
let obj = base proto {a: 1, b: 2}
let arr = base proto [p, q, r]
let fun = base proto function (...args) { ... }
let re = base proto /(\w+)\s+(\w)+/g
--
Dr. Axel Rauschmayer
[email protected]
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss