Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This article sort of reads like they think everything should be immutable, which feels kind of dogmatic. Using `with` for everything by default seems like overkill. But in C#, lately I have been using `readonly and `init` wherever vars should not be changed after initialization, which is most of them tbh. For small, data-only objects that can easily be immutable and get passed around a lot, this makes sense to me as a way to avoid the kind of bugs they are talking about.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: