There are easy ways to build a GC in portable C as well, of course, if less performant.
As you will know, in portable C you cannot even implement a system call. So what?
There are easy ways to build a GC in portable C as well, of course, if less performant.
As you will know, in portable C you cannot even implement a system call. So what?
Yes, but redefining a function and GC are not.
> There are easy ways to build a GC in portable C as well, of course, if less performant.
No, because you can't walk the stack. Also pointer aliasing.
[UPDATE] I just realized that I was wrong about redefining functions in C. Not only is it possible, you can actually do it with currently available technology using dynamically linked libraries. But I have never seen anyone actually do this (which is why it didn't occur to me).
I wrote about this in my two earlier comments. This is very old technology. And very commonly used. I think most plugin systems wrap dynamically linked libraries.
This is also an easy way to redefine functions without needing GC. Under the hood, it is implemented in the loader's way: virtual memory pages mapped as read-only and executable (see mmap() or mprotect() for example).