3 ms·
actually, you can do consevative GC in C just fine without any special support in compiler, see Boehm's GC. Which is actually what was until recently used in Mo
by dfox 16y ago
actually, you can do consevative GC in C just fine without any special support in compiler, see Boehm's GC. Which is actually what was until recently used in Mono and also extensively used by various other runtimes (gnu java, ecl, many scheme implementations...)
- rbanffy 16y agoTrue, but it would be uglier than if the compiler hid the CG behind a wall of syntactic sugar.
- dfox 16y agoWell, the only difference you see is that you call GC_malloc() instead of malloc() (and that can be redefined, even link-time), and that on some platforms (at least Cygwin and AIX, maybe also Solaris) you need to call GC_INIT() from main().
- rbanffy 16y agoYes, but that should be placed in the C code, not in the Vala sources. Assuming it's a c#/Java-like language, the programmer should be spared from this job.
- dfox 16y agoIn case of Vala I think that required modifications are pretty well limited to underlying runtime library (gobject) and do not touch compiler too much. But on the other hand they will be quite invasive across whole Gtk/Gnome platform.