3 ms·
The Go codebase I'm working on is terrible about mutation. structs get passed into functions which then may mutate them or pass them to yet another function whi
by eweise 5y ago
The Go codebase I'm working on is terrible about mutation. structs get passed into functions which then may mutate them or pass them to yet another function which mutates them. Its impossible to understand what is going just by looking at the code.
- dnautics 5y agoWell, immutable code is imperformant code!! /s
- weatherlight 5y agodebatable, unless you are doing really low level stuff, it's almost negligible. also it harder to get code using mutable data structures to scale horizontally. if you have one CPU on one machine, and your code is cpu bound, your statement is probably true.
- dnautics 5y agoyes, that's why I put two exclamation points and an /s on the end.