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

Re: Urgent subroutine signatures problems

Thread Previous | Thread Next
From:
Sawyer X
Date:
December 23, 2017 16:27
Subject:
Re: Urgent subroutine signatures problems
Message ID:
e5bdadfe-9f23-3b75-d18f-2f0b94ffacbd@gmail.com


On 12/22/2017 07:50 AM, Zefram wrote:
> Sawyer X wrote:
>> This is simpler to resolve. We can allow subroutine attributes before
>> and after.
> No, that's not a simple resolution.  If attributes are allowed in both
> places, then it's still possible for a :lvalue attribute to come after a
> signature, incurring the same problem that arises now.  This would need
> to be addressed in some way.  To just let it compile incorrectly would
> be crap.  To be less crap we'd have to enforce the :lvalue attribute going
> before any signature, which would mean the core knowing which attributes
> have to go before the signature and to check for them.  This would be
> a significant extra complication, in API as well as implementation, in
> the likely event that we later want to apply non-core attributes early
> enough to affect body compilation.

Assuming we have a list of known subroutine attributes that must appear
prior to signatures. When reading attributes past signatures, we could
check that list. I assume that's what you're referring to in the
solution above. If so, how would that be "significant extra compilation"?

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