minus-squareMichal@programming.devtoProgramming@programming.dev•[Noob here] Can someone explain to me the advantage of mutable objects?linkfedilinkarrow-up10arrow-down1·edit-210 days agoBecause recreating entire object just to make a single change is dumb. God help you if you’ve already passed the object by reference and have to chase up all the references to point at the new version! linkfedilink
minus-squareMichal@programming.devtoProgrammer Humor@programming.dev•Surely "1337" is the same as 1337, right?linkfedilinkarrow-up0·8 months agoYaml is more human readable/editable, and it’s a superset of json! linkfedilink
Because recreating entire object just to make a single change is dumb.
God help you if you’ve already passed the object by reference and have to chase up all the references to point at the new version!