On Wed, Sep 25, 2013 at 6:43 PM, Adam Crabtree <[email protected]> wrote:
> Thanks for the clarifications. It seems I was mistaken about > Object.setPrototypeOf. > > Anytime :) Rick > 1. I didn't realize in this context[1] "Object" included Functions, > Errors, etc... > 2. Reinforced by Object.create being object specific. > > Given this, it's understandable why you thought I was bizarrely expo on > Function.create. At any rate, we're in complete agreement here. > > [1] http://people.mozilla.org/~jorendorff/es6-draft.html#sec-19.1.3.19 > > > > On Tue, Sep 24, 2013 at 1:15 PM, Rick Waldron <[email protected]>wrote: > >> >> >> >> On Tue, Sep 24, 2013 at 3:45 PM, Adam Crabtree <[email protected]>wrote: >> >>> There's a combination of things going on here: >>> >>> 1. There has been discussion on ESDiscuss[1] >>> >> >> 2 years ago, and never discussed again. >> >> >>> of __proto__ and the insufficiencies of Object.create, specifically when >>> you want to set the __proto__ of something other than an Object (e.g., >>> Functions, Errors, Arrays, etc...). >>> >> >> Yes, I think we're all aware of this. >> >> I don't know what the current state of this feature is, but I know it at >>> least has been raised and acknowledged as a gap in functionality that >>> __proto__ fills[2,3]. >>> >> >> The current state is the __proto__ will remain in an annex of the spec >> and be superseded by Object.setPrototypeOf(target, source) >> >> >> >>> >>> 2. I was mistaken earlier when I said Function.create would be >>> insufficient for my use cases (and thus would require `fn.__proto__ = >>> ...`). In fact, in both of my use cases I am setting the proto of functions >>> I have created, and therefore a Function.create (where it to exist, see the >>> next point) would be sufficient. >>> >> >> Let's stop talking about Function.create. It's not a thing and never will >> be. The use cases I see on that thread, for Function.create and <| >> (triangle literal, aka proto operator) are solved using the extends >> operator with ES6 classes. >> >> >>> >>> 3. Regarding times where I may want to assign the proto of objects, >>> functions, arrays, errors, I don't own, I personally don't have a usecase >>> ATM, but I can easily imagine how that would be incredibly useful for any >>> type of library that shims, wraps or augments core or any built-ins to >>> extend their functionality seamlessly. If these sorts of libraries don't >>> already exist, I would hate to unnecessarily break the requisite >>> functionality before they have a chance to. >>> >> >> This is the juicy stuff I was looking for, and yet it's woefully >> misguided. Anyway, __proto__ isn't going to be removed from v8—like I said >> earlier about browser game theory: they don't want to be the only engine >> that doesn't support it, whether it's a standard feature or not. As far as >> it being standard, __proto__ will exist in an annex and not as part of the >> core language specification. Again, Object.setPrototypeOf() and >> Object.getPrototypeOf() will exist in its place. >> >> Rick >> >> -- >> -- >> 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. >> > > > > -- > Better a little with righteousness > than much gain with injustice. > Proverbs 16:8 > > -- > -- > 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. > -- -- 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.
