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

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

Thread Previous | Thread Next
From:
chromatic
Date:
December 15, 2008 23:04
Subject:
Re: [PATCH] Class as a Feature (take four)
Message ID:
200812152304.06715.chromatic@wgz.org
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.

> Perl is about modules.

Hence my concern.

> Making it even easier to replace things and add new modular features
> will make Perl more attractive to people like me.

I don't care about what makes Perl attractive to really smart, really capable 
developers like you.  Perl's been very good at that.  I care about what makes 
Perl attractive and useful and maintainable and clear for the other six and a 
half billion people on the planet.

I can maintain my own class keyword patch against bleadperl ad infinitum.  I 
can write and maintain my own source filter and mandate its use in every 
project I write.  I sent it here instead because I think it might be very 
nice for everyone who wants to create a class in Perl 5.12 someday to be able 
to say:

	class MyAwesomeClass is Your AwesomeClass {
		...
	}

... because I think they might find that more clear than:

	{
		package MyAwesomeClass;
		push @MyAwesomeClass::ISA, 'YourAwesomeClass';
		...
	}

> Adding more features to the core helps in the short term (they make for
> great blog posts), but ends up as bloat in the long term.  Remember
> pseudohashes?  Is a 10-year deprecation cycle really better than just not
> using a module? 

First of all, ten year deprecation cycles are stupid.

Second, what's the likelihood that the name by which we call what other 
languages call a 'class' is going to change?  I have it on pretty good 
authority that the syntax in this patch resembles the syntax of Perl 6 
strongly.  Is there not a desire to hew somewhat in that direction?

> I don't think adding a half-assed version of Moose to the core would
> help anyone.  It would be a waste of time for the people writing it, and
> a waste of time for the people using it.  (This is more in response to
> rgs' comment, rather than yours.  Moose is the right way to get
> attributes and "final" classes in Perl 5.)

Then what is the purpose of this mailing list?  Why not drop all core modules 
except those necessary to bootstrap CPAN.pm and instead concentrate on fixing 
bugs and occasionally refactoring the internals?

(And where was this argument for the 'say' patch?)

-- c

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