Should __proto__ be an accessor property of Object.prototype?

# BelleveInvis (12 years ago)

The current behaviour of proto looks ugly. The better way might be make proto an unconfigurable accessor of Object.prototype Pesudocode: Object.defineProperty(Object.prototype, 'proto', { get: function(){ return Object.getPrototype(this) }, set: function(v){ return Object.setProrotype(this, v) }, enumerable: false, configurable: false}

# Nathan Wall (12 years ago)

See this thread: esdiscuss/2013-May/030551

# Rick Waldron (12 years ago)

On Saturday, June 22, 2013, Nathan Wall wrote:

See this thread: esdiscuss/2013-May/030551

Further resolution here: rwldrn/tc39-notes/blob/master/es6/2013-05/may-21.md

I'm on my mobile and the fragment URL doesn't seem to work? Look for 4.18

# Erik Arvidsson (12 years ago)

On Sat, Jun 22, 2013 at 1:15 PM, Rick Waldron <waldron.rick at gmail.com> wrote:

Pesudocode:

Object.defineProperty(Object.prototype, 'proto', { get: function(){ return Object.getPrototype(this) }, set: function(v){ return Object.setProrotype(this, v) }, enumerable: false, configurable: false }

This is pretty much what was agreed upon. The only difference is that configurable is true because some security sensitive code needs to be able to remove the ability to change the [[Prototype]].

-- erik