Let me be more detailed, I omitted to look at your gist before answering 
(shame on me)

getPrototypeOf() return the reference to the prototype object which can or 
not be "configurable"
setPrototypeOf() would let you change the reference of the internal 
instance prototype to another object

Le jeudi 19 septembre 2013 21:54:04 UTC+2, Alexandre Morgaut a écrit :
>
> getPrototypeOf() is "meant" to be readonly
> for consistency with __proto__ a new setPrototypeOf() method is considered 
> in ECMAScript 6
> http://people.mozilla.org/~jorendorff/es6-draft.html#sec-19.1.3.19
>
> Le jeudi 19 septembre 2013 21:47:34 UTC+2, Andrew Kelley a écrit :
>>
>> mscdex on IRC pointed out that according to MDN 
>> docs<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getPrototypeOf>,
>>  
>> Object.getPrototypeOf() is read-only.
>>
>> Well this appears to be incorrect for node.js:
>>
>> https://gist.github.com/superjoe30/6628842
>>
>> my output:
>> bar - new method
>> foo - new implementation
>>
>>
>> On Thursday, September 19, 2013 3:35:59 PM UTC-4, Andrew Kelley wrote:
>>>
>>> I'm sure this has been discussed before but I don't know where.
>>>
>>> Here are some facts:
>>>
>>> 1. Putting user data (and other kinds of data if you're not careful) 
>>> inside an object is a huge security problem. Domenic explains this quite 
>>> well in the readme of his dict module: https://github.com/domenic/dict
>>> 2. Object.getPrototypeOf() is available as a perfect substitution for 
>>> __proto__. It does exactly what you want, without the security risk.
>>> 3. Developers *will* use __proto__ if it is available, and they *will* 
>>> put user data in objects.
>>>
>>> Here is an opinion:
>>>
>>> DELETE IT FOREVER!!
>>>
>>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to