Nathan Wall (2013-10-22T03:58:38.000Z)
Rick Waldron wrote:
> If this were how it was defined, I would say get rid of it and 
> practitioners will carry on using their own non-nanny implementations. 
> If it can't invoke setters then it loses properties like innerHTML. 
> 
> eg. 
> 
> Object.assign(div, { 
> innerHTML: `${name}<BR>`, 
> id: "an-id", 
> dataset: { 
> foo: 1, 
> bar: 2 
> } 
> }); 
> 
>

I see.  I wasn't clear on the use-case for `Object.assign`.  You're right; this makes sense.

Given this use for `Object.assign`, integrity probably isn't a concern for these cases.  A lot of the times, you'll know where the data's coming from, and if you don't you can filter it.  Looks like a nice short-hand (though I'm still somewhat hoping for monocle-mustache in a later edition!)  I was thinking of it too much as a cousin to `Object.mixin`, which is great for meta-programming and building abstractions.  `Object.assign` seems more geared toward being a nice little helper function.

Cool,

Nathan
domenic at domenicdenicola.com (2013-10-26T03:21:42.549Z)
Rick Waldron wrote:
> If this were how it was defined, I would say get rid of it and 
> practitioners will carry on using their own non-nanny implementations. 
> If it can't invoke setters then it loses properties like innerHTML. 
> 
> eg. 
> 
> ```js
> Object.assign(div, { 
> innerHTML: `${name}<BR>`, 
> id: "an-id", 
> dataset: { 
> foo: 1, 
> bar: 2 
> } 
> }); 
> ```
>

I see.  I wasn't clear on the use-case for `Object.assign`.  You're right; this makes sense.

Given this use for `Object.assign`, integrity probably isn't a concern for these cases.  A lot of the times, you'll know where the data's coming from, and if you don't you can filter it.  Looks like a nice short-hand (though I'm still somewhat hoping for monocle-mustache in a later edition!)  I was thinking of it too much as a cousin to `Object.mixin`, which is great for meta-programming and building abstractions.  `Object.assign` seems more geared toward being a nice little helper function.