Default values for function parameters should allow non-literals #8450
yeroca
started this conversation in
New Feature Requests
Replies: 1 comment
-
|
I would like to be cautious about adding arbitrary expressions, but I think extending to variables would be a good start. In terms of implementation, we need to evaluate at call time, not function definition time. That's a big mistake that Python made. If KCL were totally immutable, it wouldn't matter. But we do have some forms of mutation. So we should be careful to do it right. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to have the ability to use named constants for function parameter default values, e.g.:
Currently the syntax forbids non-literal defaults.
Beta Was this translation helpful? Give feedback.
All reactions