util.inherits() is probably long unloved. With full class support it would be worth thinking of slowly deprecating it as weakly suggested in #4179 by @bnoordhuis .
Since this would strongly promote the class keyword for the JS world we would need to think about whether we want to do this and in which form. Personally I am not a big fan of it in general - especially since es6 proposed style would have methods on a non 0 indentation level. So we could think about the following:
cc @nodejs/documentation @jasnell
constEventEmitter=require('events')classPureES6extendsEventEmitter{constructor(){super()}echo(val){console.log(val)}}letes6=newPureES6()es6.echo('A Value')classMixedextendsEventEmitter{constructor(){super()}_echo(val){console.log(val)}}Mixed.prototype.echo=functionecho(val){this._echo(val)}letmixed=newMixed()mixed.echo('A Value')
util.inherits() is probably long unloved. With full class support it would be worth thinking of slowly deprecating it as weakly suggested in #4179 by @bnoordhuis .
Since this would strongly promote the
classkeyword for the JS world we would need to think about whether we want to do this and in which form. Personally I am not a big fan of it in general - especially since es6 proposed style would have methods on a non 0 indentation level. So we could think about the following:cc @nodejs/documentation @jasnell