Traits, r

Andy Armstrong andy at
Fri Feb 8 13:06:45 GMT 2008

On 8 Feb 2008, at 12:44, nigel at wrote:
> Is it a pipe dream to imagine plugins slotting together cleanly like  
> lego blocks? [1]

I hope not, but as far as I know it's still a hard (in a non formal  
sense) problem. We ran into this with Test::Harness. Attempting to  
make everything extensible in as-yet-unknown ways is, er, tricky. For  
the reasons you describe.

In the end we sort of went for YAGNI-yet: let's see what people want  
to do and review the problem in that light. It feels defeatist though  
- and is but another reminder that the art/craft/science/discipline of  
programming is still immature.

> I was reading about "monkeypatches" the other day [2] - and the idea  
> of modifying running code in-situ offers a somewhat scary (from a  
> security point of view) but different take on the problem of plugins  
> working together. Installing a plugin is less like lego and more  
> like applying a software bandaid --- did it stick? Ok let's put  
> another one on. With the ability to take some off as well.

Yeah, it's more old skool certainly :)

It's exactly the same solution (with the same attendant problems) as  
hooking into vectors in DOS or BBC MOS.

We just haven't achieved clear separation between chunks of behaviour  
and their relationship to events and objects yet. Traits/Roles are  
lovely - and clearly a step in the right direction - but there's more  
work to be done.

Andy Armstrong, Hexten

More information about the mailing list