On Tue, Sep 08, 2009 at 08:55:14AM -0700, John Napiorkowski wrote: > I've spent a lot of time thinking about the intersections of Moose and > Type Constraints. My general conclusion is that I think it's correct > that TC and Moose general be detached (and I'd love to see more > detachment) since people have uses for type constraints beyond Moose. > That said, I think there is a bigger connection between TC and > Class::MOP, since my imagination is telling me that Moose will > eventually be more and more about suger and use, and functionality > will migrate toward CMOP. For example, I know we keep kicking around > the idea that Roles should be in CMOP. I also personally think some > of the bits in MooseX::Declare related to method signatures should > either be in CMOP or at least coordinated with a more rigorous > interface defined by CMOP. So again, my imagination is saying type > constraints are build on top of CMOP, and consumed by Moose or others.
In a more radical line of thought - could the type constraint system be an entirely standalone module? Are there any parts of it that rely on either Moose or Class::MOP? I guess the main issue would be circular dependencies, since the tc objects use attributes, and attributes have type constraints, but I wonder if there isn't a way to get around that. Conceptually, the type constraint system seems pretty separate already. -doy