Better HN
topnewbestaskshowjobs
Log inSign up

frwhlr

13 karma · joined Jan 22, 2018 (8y ago) · 3 submissions

Submissions

comment 8y ago · link · parent

I think spamming mutable objects around in your codebase is asking for trouble. I'd be really happy to be able to do something like this:

  foo( Object.copy(barObj) );

I mean, why would you send your state's mutable object as argument if you're 100% sure you don't want it to be changed?

comment 8y ago · link · parent

I think it is almost unbelievable that the ESxx train continues to expand the language with ever more features, while at the same time there is still no native method to deep-copy an object..

Almost everything in JS is an object, but there is no reliable way to copy one.. Feels like an epic failure to me. Would it not be an idea for the ESxx team to finally fix this core issue for the first upcoming release?

comment 8y ago · link · parent

It's an ad!