A Matías Quezada (2013-12-18T09:23:21.000Z)
domenic at domenicdenicola.com (2014-01-03T16:22:09.301Z)
I can't see a better use for extra arguments than multiple extensions. This is how current libraries implement it and we expect to replace it with `Object.assign`. In case `Object.assign` accepts only two arguments I think this snippet will be everywhere ```js Object.assign(Object.assign({}, defaultParams), userParams); // or [ {}, defaultParams, userParams ].reduce(Object.assign); ``` I think using properties descriptor at `Object.assign` will be a mix of concepts, and a pattern I see a lot less than `_.extend`, and we'll be able to do it anyway ```js Object.defineProperties(Object.assign({}, properties), descriptors); // or Object.assign(Object.create(something, descriptors), properties); ``` And deep copy doesn't look like an option for me, as Brendan said it adds so much complexity for an edge case. I think accepting several source objects like `_.extend`, `$.extend` and `angular.extend` would be the more practical option.
domenic at domenicdenicola.com (2014-01-03T16:21:26.201Z)
I can't see a better use for extra arguments than multiple extensions. This is how current libraries implement it and we expect to replace it with `Object.assign`. In case `Object.assig`n accepts only two arguments I think this snippet will be everywhere ```js Object.assign(Object.assign({}, defaultParams), userParams); // or [ {}, defaultParams, userParams ].reduce(Object.assign); ``` I think using properties descriptor at Object.assign will be a mix of concepts, and a pattern I see a lot less than _.extend, and we'll be able to do it anyway ```js Object.defineProperties(Object.assign({}, properties), descriptors); // or Object.assign(Object.create(something, descriptors), properties); ``` And deep copy doesn't look like an option for me, as Brendan said it adds so much complexity for an edge case. I think accepting several source objects like `_.extend`, `$.extend` and `angular.extend` would be the more practical option.