behavior of named arguments in function types
- Dominant language
- C++
- Stars
- 25.7k
- Forks
- 6.2k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 21
Description
- #2428's initial intention was to remove named arguments in function types
- They are currently marked as deprecated.
- They were considered to be removed in #4219.
- However, there was no consensus about removal, so so far they are still there, but still deprecated.
However, they do not work as desired (in case they are not removed and undeprecated after all). Naming arguments in calls should work, but doesn't:
```
function(uint a, uint b) returns(uint) f;
f({a: 1, b: 2)};
```
Assigning from functions with different names doesn't work either, but it has been suggested that it should (to be discussed):
```
contract C {
function f(address recipient, address sender) { ... }
function g() {
function(address sender, address recipient) localf = f;
localf({sender: ..., recipient: ...});
}
}
```
Contributor guide
Research direction
Review the history in #2428 and #4219 and the two Solidity examples in this issue first. Clarify whether named arguments should be removed or supported, including calls and assignments between functions with different argument names; done requires an agreed semantic direction and corresponding verified behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- solidity
- Domain
- blockchain, compilers
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100