PPC 21 - short circuiting and lvalue
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 79
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
What should happen with this code
$undef?->[0] = die
In the undef case, should this shortcircuit the assignment RHS, or run the code and not store it?
Similar question for
($but?->{why}, $for_sure) = (9001, 9002)
Considering the second, it would seem like we wouldn't necessarily wanna short circuit. Perhaps it doesn't make sense to use optchain as an lvalue?
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 with the two Perl examples in the issue and review the surrounding discussion about optional chaining as an lvalue. Determine the intended behavior for RHS evaluation and tuple assignment when the chain is undef. Done means reaching an agreed language-semantics decision and documenting the proposal; no files or tests are named.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100