4 ms·
Some important programming paradigms are extremely hard or near-to-impossible without GC. See functional or concurrent lockless programming. Sure, for many impe
by pkolaczk 12y ago
Some important programming paradigms are extremely hard or near-to-impossible without GC. See functional or concurrent lockless programming. Sure, for many imperative programs you can get away with simple memory management schemes like RAII.
- dandrews 12y agoI'd make your same observation. Like the parent, I'm proud of my imperative code and never used to consider memory management a particularly onerous task. I was brought up on it y'know, just a part of writing good code. But then I started Lisp in earnest, found GC useful (necessary!) there, and more recently have gone functional with Clojure. Couldn't do without GC now. One of these days perhaps we'll have concurrent collectors a la Azul, running on a specialized core/MMU on some multiprocessor SoC, and GC will fade into the background and nobody will care so much about performance. Hey, I can dream.
- jheriko 12y agoi do a lot of lockless programming and avoid these problems almost entirely... although i will admit to having written a custom allocator or two for that scenario. i don't really see why being functional adds some extra requirement where stuff can't be freed automatically or by hand... without resorting to gc