On Sun, Jun 17, 2012 at 12:37 PM, Elias Gabriel Amaral da Silva < [email protected]> wrote:
> On Sun, Jun 17, 2012 at 2:26 PM, Jonathan S. Shapiro <[email protected]> > wrote:> Though now that I think about it, full type agreement may not be > required. > > We're only going to be passing around a pointer to the supertype (the > > generic interface), and we *do* know the type of that. I *think* that > > reduces the problem down to ensuring that stack region safety is not > > violated. > > But if you know the interface and you use only this interface, there > is full type agreement. > Yes. In this particular usage pattern, you know everything you need to know to *invoke* the object, but you don't have enough information to stack-allocate the object, because you don't know the size. Except you *do* know the size, because the interface tells you. The problem is that you know the size in a way that can only be used to perform an untyped storage allocation.
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
