The official position is that __proto__ is not allowed. The official position is also that all official positions are subject to exception in the rare case that making an exception makes the code simpler and more performant. TBD whether this case merits such an exception.
On Mon, May 7, 2012 at 1:04 PM, Domenic Denicola <[email protected]> wrote: > > > On Monday, May 7, 2012 3:50:17 PM UTC-4, Nathan Rajlich wrote: >> >> The reason __proto__ was used in this case was because >> SlowBuffer.prototype already had properties set on it from C++-land, which >> we don't want to overwrite. >> > > Got it. I didn't quite understand what the win was, but after that > explanation, it makes sense. I guess this is one of those all-too-frequent > cases where __proto__ is more flexible than the > standards-committee--approved approach. As ugly as the __'s are, unnecessary > property-copying code is probably worse. > > Thanks!
