I've been holding off replying to this, because I keep hoping that I'll
read it when I'm more awake and understand what David is saying. I'm still
not convinced that I do, but here goes:

On Sat, Jul 13, 2013 at 10:38 PM, David Jeske <[email protected]> wrote:

> I should state up front, I'm not trying to enable transparent reference
> counting!
>
> I'm thinking about how to make very effective patterns from C be typesafe.
>
> In C these things are often packed arrays of structs, with direct non-safe
> pointers to each-other, or merely non-typesafe integer array indicies.
> Today, if I want to code these same strategies in a typesafe manner,
> including the manually coded reference counting and lifetime tracking, I
> don't see a language which allows me the facilities to even do so in a
> typesafe manner.
>

So it took me a while to process this, and I'm still not sure I have it
right. If my attempt to repeat the problem statement isn't right, probably
best to ignore the rest of my answer.

The problem statement, as I understand it, is that you want the ability to
do efficient indexing (either by pointer increment or cursor increment)
over elements of an array, and you want to do it in a type-safe manner.

I know of only two ways to do this: fat pointers (equivalently: fat
cursors) and dependent types. In both cases the result is to augment the
pointer/cursor with bounds information and ensure that it is statically or
dynamically checked. Cyclone did some of this, for example.

Is this the kind of thing you are thinking about?

I'll respond to the GC part of the discussion in a separate reply, for mail
threading reasons.


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

Reply via email to