On Tue, Sep 8, 2009 at 1:32 PM, John Napiorkowski<[email protected]> wrote: > > > > > ----- Original Message ---- >> From: Hans Dieter Pearcey <[email protected]> >> To: moose <[email protected]> >> Sent: Tuesday, September 8, 2009 1:21:51 PM >> Subject: Re: MooseX::Types to core? >> >> Excerpts from Chris Fields's message of Tue Sep 08 13:14:20 -0400 2009: >> > I think the suggestion is that type constraints be completely divorced >> > from Moose so that other possibly non-Moose/CMOP projects can use it w/ >> > o requiring Moose/CMOP. Or is that missing the mark John? > > I think cut from Moose yet, but not from CMOP. I think we will need to think > the > relationship between CMOP and TC is complex. TC would be build on CMOP, > but CMOP would want a TC system for full functionality (as if someday we > decided > to move some of the method signature checking to CMOP, which is where I think > it > would be most useful, but I could be wrong). > >> >> I understand the suggestion, and it is a reasonable one. Why would such a >> type >> constraint implementation be mutually exclusive with MooseX::Types going into >> core? Wouldn't we just reimplement Moose::Types in terms of this new >> independent code? >> >> hdp. > > Yeah, totally. As per my last email I agree with the sentiment here, with > the caveat > regarding backcompatibility.
CMOP has always been (in my mind) a formalization of Perl5's implicit MOP. While it's not 100% accurate that is the general driving principle from what conversations we've had over the years. I like the idea of having TCs spun off into their own creature and Moose::Types built upon this creature ... but I hesitate to say things like Method signature checking should go into CMOP since there is no such facility in Perl5 itself and such a facility doesn't "compile away clean" like say Roles do. That said ... CMOP would should (eventually) have some facility for introspecting Lexical Types since those do exist in Perl5 (and as such we can push their implementation into something more useful). -Chris
