On Fri, Jul 26, 2013 at 11:33 AM, David Jeske <[email protected]> wrote:

> On Thu, Jul 25, 2013 at 10:47 AM, Jonathan S. Shapiro <[email protected]>wrote:
>
>> GC doesn't need to be the only mechanism or even the majority mechanism,
>> but it needs to be part of the portfolio, and it's been shown repeatedly
>> that it can't be done in a library. If nothing else, accurate GC support
>> imposes constraints on the optimizer and code generator.
>>
>
> This may be true from a theoretical standpoint, but I think practical
> issues push in a different direction. If there is GC, then (most) libraries
> are built assuming GC and it becomes effectively impossible to use that
> system without GC.. (unless you rewrite the entire world, at which point
> the language itself is the least of your worries)
>
> This suggests a much clearer dichotomy between strictly "GC-or-not", which
> very much mirrors what has evolved in real systems.
>

I agree. Though that doesn't stop us from building libraries that exploit a
broader portfolio of techniques.

The point I was trying to make, though, is that accurate GC *cannot* be
implemented without compiler support. There's an old paper by Boehm and
somebody about this.


> I see it as a bit of a quantization problem. It's certainly possible to
> have hybrid systems, it's just that there is so much less human effort
> expended building an entire ecosystem of libraries as either a non-GC or
> full-GC system that half-GC is not a stable state for a single language IMO.
>

I don't agree. I think what you say is likely true if the user has to
hand-annotate all of the references in question. I think it ceases to be
true if the compiler can automatically apply explicit region management and
infer the non-escape of borrowed pointers. I also think that there are
particular use cases for which programmers *will* annotate, but I agree
those are probably rare.

There has been good work on region inference. An interesting pair of
questions is:

  1. Under what conditions should we GC a region?
  2. How often can a compiler determine [statically] that these conditions
are not met,
     and GC is therefore unnecessary on that region.


Jonathan
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to