-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default argument of function #1178
Labels
lang
Language design
Comments
@taichi-ishitani I think temporarily disabling this feature for v0.13.4 is better. How about it? |
I agree with you. I will open a PR for this. |
taichi-ishitani
added a commit
to taichi-ishitani/veryl
that referenced
this issue
Jan 3, 2025
taichi-ishitani
added a commit
to taichi-ishitani/veryl
that referenced
this issue
Jan 3, 2025
I opened PR #1181 for this. |
taichi-ishitani
added a commit
to taichi-ishitani/veryl
that referenced
this issue
Jan 3, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#1164 introduced default argument of function too, but I think more consideration is required.
In the following case, calling
FuncA(0, 0)
is ambiguous. It may bei_a = 1, i_b = 0, i_c = 0
ori_a = 0, i_b = 1, i_c = 0
.To prevent this issue, the restriction that default arguments should be placed at last may be required.
At module instantiation, port names are shown, and it is clear which ports are omitted.
But at function, argument names are not shown, so explicitness is lower than module instantiation.
Forbidding default argument may be reasonable as the same as Go / Rust.
The text was updated successfully, but these errors were encountered: