OK. So let's go back and look at options here. The problem with init-only
vs. pure typing is coming from the need to preserve inner references in the
language. So let's ask how badly we really need that.

My main use-cases for inner references are as follows:

1. (Doubly) linked list chains in the kernel that are embedded in the
structures being linked
2. Things analogous to by-ref, e.g. for stack allocation.

I have already more or less decided that the language wants to distinguish
between refs and pointers (presumptively typed, lifetime unsafe, point
outside the GC heap). For pointers, there is no real issue. The question is:
is this sufficient? That is, could we drop the ability to do inner
references within the GC heap?

Sadly, I think the answer is "no". I think we could probably take the
feature out at the source level, but I think we want it both for
optimization purposes and for C/C++ conversion purposes. I *am*, however,
willing to remove them *for now, *if we must.

But this won't ultimately make the issue go away, and it seems to me that
there are really only two ways to deal with this in the long term:

1. Introduce a notion of pure data structures and pure references
references.
2. Abandon the notion of purity entirely, in favor of an approach that is
more explicitly lifetime-oriented.

I'm going to take these up in a separate discussion thread in just a moment,
so *please* don't respond on this issue here!
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to