[svn:parrot] r31285 - trunk/languages/perl6/tools

Nicholas Clark nick at ccl4.org
Sun Sep 21 22:06:51 UTC 2008


On Sun, Sep 21, 2008 at 11:18:53AM +0200, Moritz Lenz wrote:
> jerry gay wrote:
> > On Sat, Sep 20, 2008 at 2:41 PM, Moritz Lenz
> > <moritz at casella.verplant.org> wrote:
> >> chromatic wrote:
> >>> On Saturday 20 September 2008 01:06:40 moritz at cvs.perl.org wrote:

> >>>> @@ -54,11 +54,15 @@
> >>>>  use File::Spec;
> >>>>  use File::Path;
> >>>>  use Text::Diff;
> >>>> +use threads;
> >>>> +use threads::shared;
> >>>> +use Thread::Queue;
> >>>
> >>> Any Perl built without thread support will die at this point.
> >>
> >> That's not nice but also not so very bad, since almost nobody needs this
> >> script. If somebody complains who actually wants to use this and has no
> >> thread support, and complains to me, I'll revert this commit. If not,
> >> I'll leave it as is.

The elegant solution is to change the use to a require, inside the if block
that actually needs Thread::Queue. I suspect that this was what chromatic
was intimating.

> > can we agree to have this entered as a cage task, so that someone with
> > tuits can put together a solution, rather than building technical debt
> > by ignoring a bug?
> 
> Why is it a bug? When a script uses a module that's not installed, we
> don't call it a bug either - it just has an additional dependency. This
> is this so different with 'use threads'? Or is there a policy somewhere
> in the parrot project that says "nothing should depend on a threaded perl"?

Because it doesn't *need* threads to work. You've taken something that worked
everywhere and restricted it, for the purpose of an optimisation. And that
restriction is by dint of your choice of implementation of the optimisation.

Swap to 'require' and *everyone* can have their cake and eat it.

So, as far as this script goes, if it goes to the pugs repository, that's fine.
But in the general case, I think that policy should be not to make
optimisations that restrict the accessibility of parrot, and hence impede
its update.

Nicholas Clark



More information about the parrot-dev mailing list