title: Why is it "impossible" to implement garbage collection in C because of weak typing?
body: <p>I was told by a rather smart person that you cannot implement garbage collection in C because of it's weakly typed. The basic idea seems to be that C gives you too much freedom. He mentioned casting pointers without type checking...</p>
  
  <p>I don't really grok the idea. Can someone give me an explanation and possibly a code sample of why this wouldn't work.</p>
  
  <p>NOTE: Obviously C is about speed and why would you want to add garbage collection? I'm just curious really.</p>