Explore required named parameters
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
No files, tests, or compiler entry points are named. Start by locating how function definitions and calls are parsed and represented, then determine whether required named parameters fit the language design. Done would require an agreed specification, implementation scope, and tests for valid and invalid calls.
Written by the indexing model from the issue text.
Description
In python a function can define defaults for parameters, and then have the caller assign values to those parameters in the call by referencing the parameter name.
An example:
def foo(paramA=1):
return paramA + 1
>>> foo(paramA=20)
>>> 21
However, in python this is optional, and these named parameters can be left out during a call. They will just assume the default value in the function definition. We could make them implied in LJ with no default declarations in the function definition, but callers must pass all arguments by referencing the parameter names.
This would require the developer to know the names of the parameters, but it would take away all of the guesswork of parameter order. It perhaps goes against the terse philosophy of less java, but I think it might prove to be more user friendly. I haven't searched for any literature on this feature. If anybody knows of any off hand please reference it on this issue.
Discussion is welcome.
- Dominant language
- Java
- Stars
- 6
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
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.
More from JMU-CS/less-java
-
cleanup help wanted
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
cleanup
Difficulty 1/5 Under an hour Newbie friendliness 45/100
-
cleanup enhancement
Difficulty 5/5 Over a week Newbie friendliness 10/100
-
cleanup
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Add REPL Openenhancement
Difficulty 5/5 Over a week Newbie friendliness 15/100
All issues in JMU-CS/less-java
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100