Hacker News new | ask | show | jobs
by kazinator 2018 days ago
Once you teach people a valuable technique, they don't want to back to being ignorant of that technique or avoid using it when they are able and it's the best tool for the job.

They also don't want to throw away all their other valuable techniques.

Programming with mutation is not just efficient, it is also highly expressive and easy to verify, for the right kinds of problems.

Just because it's useful for writing operating systems, video games and database engines, don't be mistaken in assuming that it's only useful for operating systems, video games and database engines.

1 comments

It's also a footgun waiting to happen, because I 150% promise you a junior dev or even senior dev will somewhere forget to pass by value instead of pass by reference. There is a reason why Julia and ruby encourages sigilling functions capable of mutating with a !. That character is not chosen randomly.

Yes, it is also absolutely necessary for expressive A* pathfinding.

This is unnecessary for someone connecting two web APIs. Correctness in most domains is totally worth not having to worry about pass-by-reference defaults.