11 comments

2

They don't teach that in programming? Here in spain they hammer you about the von newman machine, components of a computer and how memory works.

1

Thank Knuth for garbage collection.

3

Garbage collection is part of the reason software still runs as slow as it did in 1997

3

Lol what? Have you actually used any modern languages since 1997? And no not shitty Java, that's slow for everything.

1

Hey! Don't diss Java.

0

Java is actually pretty fast if you don't do stupid things. It's just that Java programmers tend to produce pretty complex OO code with lots of small objects that kill performance. But still, compared to other "modern" languages like Python or Ruby, Java is very fast.

1

I could turn your claim on its head and state that explicit memory management is part of the reason software is as buggy as it was in 1997.

Explicit memory management is a form of premature optimization and it's error prone: bugs, sometimes serious security bugs, can be introduced (use after free anyone?). So while it's obvious that my claim is true, you provided no evidence for yours.

0

a) you posted nothing proving your claim. It's really not that difficult to manage memory. I've written several data structures in C using malloc/free without much trouble.

b) since we are using psudo proof: Garbage collection breeds lazy and unskilled programmers which leads to aweful software like Batman. Not to mention how awful it is to bounce pointers all over the place raping the cache, and wasting tons of cpu cycles cleaning up and allocating memory whe its not needed.

1

You did not address my claims. GC is less error prone, and the performance hit is often (not always, but often) justified.

You want proof that manual memory management is error prone? Here it is. Wait, here's some more.

You want proof that GC performs BETTER than manual memory management for SOME (not all) workloads? Here it is

Can you please quit your jihad against GC and try to embrace a more balanced view?

0

Garbage collection does not necessarily mean tracing garbage collection.

Reference counting works fine most of the time, unless you're doing some real-time software.

0

I bookmarked this. Thanks.