Oh, I think I see what you mean now. Yeah, combining unboxed types and general dependent types would be complicated.
On Wed, Jul 2, 2014 at 9:31 PM, Geoffrey Irving <[email protected]> wrote: > On Wednesday, July 2, 2014, Matt Oliveri <[email protected]> wrote: >> >> You don't know all the types at compile time with polymorphism either, >> if I understand what you mean. So I don't think that's the issue. > > > I was responding to shap's concern that in dependent types you don't know > the shape of values at compile time (their size, for instance). Languages > with typical polymorphism have values that are all the same shape in that > sense, typically just a pointer. > > When that breaks down, such as for float arrays in ocaml, you have to make > up the difference with runtime type checking. That is, if you pull an entry > out of a polymorphic array in ocaml, a runtime check is required to know > whether it needs to be reboxed. > > If bitc were to have full dependent types with no runtime / compile time > separation, as well as full support for unboxed values, that issue in ocaml > would become the norm. You're correct that it's already the norm even with > simple polymorphism, but at least an earlier version of bitc did > template-like instantiation to push the problem to compile time. I do not > remember whether that's changed. _______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
