in reply to what would you like to see in perl5.12?

A solid, complete implementation of attributes. Luckily, attributes are marked experimental.

Here's the issues I think need to be addressed, in a fuzzily sorted order of importance.

Some two years ago I wrote a note about why I think the current implementation of attributes is broken. I also wrote about a set of modules that would solve some of the issues. While I believe it was a better implementation than the alternatives it didn't overcome the major obstacles as they require changes in the perl source. So I put that work back on the shelf. In real life this is a "redo and do it right" subject.

I still believe there's a lot of potential in attributes, if only implemented properly.

Update: see Namespaces and importing/exporting of attributes for a concrete idea of a possible improvement.

lodin

Replies are listed 'Best First'.
Re^2: what would you like to see in perl5.12? (attributes)
by TimToady (Parson) on Aug 21, 2007 at 17:39 UTC
    I still believe there's a lot of potential in attributes, if only implemented properly.
    First have a look at how properties and traits are completely unified with object attributes and roles/mixins in Perl 6, which pretty much covers all of your points without thinking of attributes as a separate facility. I have this crazy notion that "implemented properly" must be preceded by "designed properly", you see... :-)
      Right, but I don't know that Perl 5 has the luxury to do any better than "designed well enough".