[nodejs] Re: Suggestion for the implementation of util.inherits()

2013-03-05 Thread greelgorke
Your version makes the prototype chain longer, which may have a performance impact on some important parts of the lib. Please Correct me if i'm wrong, but this could produce chains: CustomStream->(ReadableStream->) Stream->EventEmitter->Object.prototype vs new one: CustomStream->CustomStream.prot

[nodejs] Re: Suggestion for the implementation of util.inherits()

2013-03-07 Thread Marco Rogers
Your problem is way simpler than this (though a little tough to explain). The problem in your example is that you are creating a dynamic object based on the AsLinker constructor before you have finished setting up the constructor. See my comments on your example. // Pull in your dependencies va

Re: [nodejs] Re: Suggestion for the implementation of util.inherits()

2013-03-05 Thread Isaac Schlueter
We're not going to change util.inherits any time in the foreseeable future. Feel free to implement your own thing and share it on npm. On Tue, Mar 5, 2013 at 12:33 AM, greelgorke wrote: > Your version makes the prototype chain longer, which may have a > performance impact on some important par

Re: [nodejs] Re: Suggestion for the implementation of util.inherits()

2013-03-05 Thread Tim Caswell
On Tue, Mar 5, 2013 at 2:33 AM, greelgorke wrote: > Your version makes the prototype chain longer, which may have a > performance impact on some important parts of the lib. Please Correct me if > i'm wrong, but this could produce chains: > CustomStream->(ReadableStream->) Stream->EventEmitter->Ob