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!

Reply via email to