[PPC0030] - Clarifications on `use overload` interaction
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 79
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
The PPC document doesn't actually talk about use overload at all.
In the course of implementing it (https://github.com/Perl/perl5/pull/24304), currently I have fully created an overload category for the equ and === operators, allowing a class to use overload equ => ... to specify its overloading behaviour here.
But I wonder if this should be considered correct, or not. We say that the equ operator's behaviour can be explained in terms of some defined checks and the eq operator. While we allow the eq operator to be overloaded, we don't allow defined to be.
I wonder if therefore, we should say that equ (and related) are not independently overloadable, but instead are just implemented in exactly these terms - a defined check first that cannot be overridden, followed by a possibly-overloaded eq check.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the PPC document and the linked perl5 pull request, then review how use overload currently treats equ and ===. Done means the interaction is resolved as a clear specification decision and the PPC document explains whether these operators are independently overloadable or defined through defined and eq.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- compilers, documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100