setPrototypeOf vs obj.__proto__ assignment

David Bruant bruant.d at
Mon Apr 7 02:26:33 PDT 2014

Le 07/04/2014 11:05, Andreas Rossberg a écrit :
> On 4 April 2014 19:49, Allen Wirfs-Brock <allen at> wrote:
>> __proto__ is there for legacy compatibility.
>> setPrototypeOf should be preferred for new code
> For new code, neither should be used.

For new code, in most practical cases, people can use class&extend 
including to subclass Array and Date where __proto__ used to be the only 


More information about the es-discuss mailing list