DEV Community

Discussion on: Mutation is ok

Collapse
 
miketalbot profile image
Mike Talbot ⭐

Nice syntax and a feeling of "doing the right thing" lead to very inefficient code when it comes to immutability. This is a very nice article - I took a look at the costs of immutability in tight loops and code myself (which is another lens on this subject):

Collapse
 
phlash profile image
Phil Ashby

My take on this - if the 'feels right' / 'elegant' solution isn't performant, then the language may have a problem - one of the reasons I like Python, the 'right way' is usually pretty quick too!

Collapse
 
miketalbot profile image
Mike Talbot ⭐

There is certainly a lot more sugar in JavaScript these days, and it's not always good for you ;)