On Sat, Dec 27, 2014 at 9:50 AM, Matt Oliveri <[email protected]> wrote:
> On Fri, Dec 26, 2014 at 7:44 PM, David Jeske <[email protected]> wrote: > > Personally, the pattern-like behavior I miss the most in > > modular-compilation-land is the ability for the compiler to statically > > validated that matching covers all cases. However, with modular > compilation > > this requires all types used in the matching to be defined in the module > the > > match exists in (so they can't later change after a dependent module > > update). I suspect this is one of the reasons most languages with solid > > matching are whole-program-compilers. > > I don't follow the reasoning here. Please explain? Matt: I believe David is trying to say that a pattern match can be written in such a way that it only works for certain types. In my opinion, it's stronger than that. The moment you use a pattern at all, you are either going to remove most of the genericity at the thing you are matching (e.g. if you match x::y you're requiring a list 'a) or you are at least going to be introducing a constraint of some form. (e.g. "those types 'a having member "x"). But I think David isn't entirely right that this is a separate compilation issue. I think the real issue lies in the fact that the type system that survives to the late binding stage doesn't admit all of the constraints you might want. Well, that and there's probably a pretty severe boxing penalty in something like CLI. shap
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
