4 ms·
I enjoy both kinds of languages. I do think garbage collectors are overrated. When using certain styles in C or C++, memory management is really a tiny aspect
by Peaker 10y ago
I enjoy both kinds of languages.
I do think garbage collectors are overrated.
When using certain styles in C or C++, memory management is really a tiny aspect you have to spend a tiny minority of your time thinking about -- but you gain so much determinism of execution in return.
I've been burnt by garbage collection killing my programs' performance many times -- having to tune the garbage collector has taken more time than just writing manual memory management in some cases!
Also, dynamic memory allocation and garbage collection just injects so much dynamism and uncertainty in your program's execution. I dislike it for the same reason I dislike dynamic typing. I want to be able to statically reason about the resource use of my program, just like I want to statically reason about any other aspect of my program.
- njharman 10y agoDeterministic! My usual coding projects (distributed, networked, multi-process/multi-thread) are so far from determinism and my problems so many levels above the concerns of C/C++. Both are needed. Just saying I'm glad other devs work on the lower level stuff for me ;)
- Peaker 10y agoNon-determinism comes in many forms. I don't think it's an all or nothing thing. Eliminating non-determinism is always nice, even if lots of other non-determinism remains. Having predictable and understandable resource use is a nice plus. Removing dynamic memory allocation also tends to increase locality, remove indirections, and remove error handling paths from your code.