5 ms·
That's an interesting point of view. I really don't buy that garbage collection has advantages for the user. Sure it has advantages for the developer of the lan
by fguerraz 3y ago
That's an interesting point of view. I really don't buy that garbage collection has advantages for the user. Sure it has advantages for the developer of the language, like a GIL, but for the user, it's more a constraint they have to live with.
- pohl 3y agoEveryone pays all the time — through externalities.
- avidphantasm 3y agoMaybe I’m missing what you are saying, but my take is that millions of Python, Java, JS, and Ruby programmers would beg to differ. Even if GC sometimes causes problems, 95% of the time it vastly reduces the friction involved with solving problems using computers.
- pmontra 3y agoAgreed. I started writing CGI scripts in C in 1994 then switched to Perl because of CGI.pm and because I didn't have anymore to malloc and free memory, especially in am application domain filled with string manipulation. Then some Java, a lot of Ruby, JS, Python. Manual memory management for this kind of applications is unnecessary optimization. If there is memory pressure on servers there are cheaper ways to remove it than the developer time to manually manage memory.
- pjmlp 3y agoActually that would have been the best way to program on UNIX. Leave C for the kernel stuff, and use Perl and similar languages as much as possible for userspace. Unfortunelly it doesn't help that many of them lack any kind of compilation, dynamic or static, thus making many reach out to C and derived languages. For me the ideal UNIX is something like Inferno/Limbo, Android,....
- enkid 3y agoGarbage collection, if well implemented, makes a program less buggy and more secure. Those are benefits to the user.
- Ygg2 3y agoIt does come with a huge penalty. Want to get rid of your GC pauses? Good luck with that. Best case scenario like D you get to split your libraries in GC and non-GC, or C# where you can kinda skirt around it with structs and stackalloc. Worst case scenario Java without value types - Rewrite it in another language.
- pebal 3y agoYou can have completely pauseless GC. Take a look at SGCL for C++.
- scotty79 3y agoThe benefit for the user is that the software exists. While it might have not if the developer was forced to be bothered with manual memory management.
- aatd86 3y agoThat's true of anything though. And at a meta level, the end users do benefit from faster iteration. "Yes I could do without this tool, using my bare hands... But I created this tool and now it's easier and I'm faster at iterating. And since it is easier the production cost decreases. Which means I could charge less while retaining the same margin. "