Follow

mutable by default is the ultimate premature optimization

@yogthos I'm increasingly persuaded by the value of immutability.

@simon_brooke for me the biggest benefit is the ability to do local reasoning. It's nice to be able to look at a piece of code and to be able to understand it without having to know what the rest of the program is doing.

@yogthos
Aye, but, as we increasingly move to architectures with thousands or millions of processors, immutability becomes key because otherwise a processor cannot tell whether a copy of an object in its local cache is canonical.

@yogthos
<shitpost> Shared mutable state is the root of all premature optimization </shitpost>

@yogthos Took me some time to read properly, but totally agreed.
Sign in to participate in the conversation
Mastodon

Follow friends and discover new ones. Publish anything you want: links, pictures, text, video. This server is run by the main developers of the Mastodon project. Everyone is welcome as long as you follow our code of conduct!