develooper Front page | perl.perl5.porters | Postings from January 2015

Re: [perl #123069] signature/attribute syntax is awful

Thread Previous | Thread Next
From:
Peter Martini
Date:
January 18, 2015 15:27
Subject:
Re: [perl #123069] signature/attribute syntax is awful
Message ID:
CAFyW6MQZ-nvUHrO3TVYU_xYMrPFq5NZDgD6-B7USDs8647aFUA@mail.gmail.com
On Fri, Jan 16, 2015 at 11:03 AM, Dave Mitchell <davem@iabyn.com> wrote:

> On Thu, Jan 15, 2015 at 10:11:04PM -0500, Ricardo Signes wrote:
> > * Peter Martini via RT <perlbug-comment@perl.org> [2015-01-14T11:24:01]
> > > Is there objection, and if so how strong, to applying this change as
> is (with
> > > appropriate doc changes, of course)?
> >
> > None from me.
>
> I approve of the change, but would prefer that FC's suggestion (if viable)
> be done to avoid the big code duplication that the current diff
> introduces.
>
>
It's a bit sticky to do that because the subsignatures chunk relies on a
block being introduced earlier in the branch, and that means we're
introducing an extra block scope for every time the 'sub' keyword is used
(and since this includes declarations where there shouldn't be a code
block, we're in some cases throwing away that block anyway as well).

I pushed a branch, pcm/rt123069-sig-attr-order-v2, that did the basics of
this, and it fails a couple of tests based on the extra block: B::Concise
and XS-APITest blockhooks.

I'm looking to see how cleanly I can get around this, but it will certainly
be more involved than the current patch;

would it make sense to push the patch as-is to get the user visible change
in before contentious code freeze, while I/we keep working on an alternate
approach?

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