----- Original Message ----
> From: Chris Prather <perig...@gmail.com>
> To: John Napiorkowski <jjn1...@yahoo.com>
> Cc: moose <moose@perl.org>
> Sent: Tuesday, September 8, 2009 1:41:39 PM
> Subject: Re: MooseX::Types to core?
> 
> On Tue, Sep 8, 2009 at 1:32 PM, John Napiorkowskiwrote:
> >
> >
> >
> >
> > ----- Original Message ----
> >> From: Hans Dieter Pearcey 
> >> To: moose 
> >> 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

It's possible the way we are doing it now with MooseX::Declare is essentially 
the
correct way, isolating the method sig stuff in it's own dist (as well as the 
actual
parsing of the signature string in it's own class).  I'm not sure.  I can see 
either
side.

However, I think the interface for the signature might be usefully built in, 
rather
than the actual implementation.  That would offer guidance to people writing 
the implementations, although right now we just have the one.

> (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

I don't know enough about Perl guts, but when people ask me what I'd like
to see in Perl 5.12 I usually say more exposure of these lower level bits to
make is easier (and probably faster and more stable) to expand upon them.
Maybe we already have what we need though.  I'm not enough of a C programmer
to be able to tell.

john


      

Reply via email to