develooper Front page | perl.perl5.porters | Postings from December 2008

Re: [PATCH] Class as a Feature (take four)

Thread Previous | Thread Next
From:
Matt S Trout
Date:
December 19, 2008 07:36
Subject:
Re: [PATCH] Class as a Feature (take four)
Message ID:
20081219153557.GE27213@agaton.scsys.co.uk
On Mon, Dec 15, 2008 at 11:04:06PM -0800, chromatic wrote:
> On Monday 15 December 2008 21:59:55 Jonathan Rockway wrote:
> 
> > > That theory didn't work out very well for Tcl or Lisp.
> > I am not sure what you mean here.
> 
> Tcl and Lisp didn't enforce one way to do things.  You can roll your own 
> control structures!  You can roll your own object systems!
> 
> Then everyone did.
> 
> Then people started sharing code, and every library had a slightly different, 
> slightly incompatible way of doing things, even though they were all doing 
> basically the same things.
> 
> Note that Tcl 8.x and Common Lisp have defaults now.

And they spent a long time figuring out what to make those defaults.

With MooseX::Declare we've already started doing that, and people are putting
this into use.

I would be delighted to support a class keyword going into core, and even
in the small ways my lame C skills allow even help with it - but you seem
to have written this out of the blue and been playing with it based on
suggestions from p5p rather than paying attention to what we're already
using.

And that part worries me a little bit - the BEGIN time thing seems pointless
to me, and is a continuing tendency to repeat the awful mistake of the 'sub'
keyword (I will happily expand on why I think compile-time sub is a pain if
you like but I elide it here because the fact I hate it is the key point)
and isn't something we've ever wanted yet.

Please can we consider MooseX::Declare's class keyword to be the prototype for
this (Florian is happy to factor it out so it exists in isolation rather than
as part of MX::Declare) and then any class keyword committed to 5.12 can
share its test suite, and we'll already know that the semantics work for
people because they've been using them off CPAN already :)

Note that that doesn't mean if BEGIN time class {} turns out to be something
people widely want we shouldn't fix MX::Declare to match rather than you
removing it from your patch - I use that merely as an example of a feature
difference.

I'm hugely impressed by your work so far, but my paranoia is exactly what
you're talking about - ending up with multiple, slightly incompatible versions
of this - two is enough if one is already used by lots of Moose code ...

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/            http://www.shadowcat.co.uk/servers/

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About