Allow constant parameters to have constant default values #2302
Sanian-Creations
started this conversation in
Proposals
Replies: 1 comment
-
Talked about this w/ gb on discord and this is a deliberate design choice that won't be implemented. |
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
-
The problem I'm facing is I want to have two procedures which draw a texture, only one does a calculation to center the image, and one does not. I figured I could use a constant argument to generate both since their code would be similar, and a default argument for common cases.
I've implemented it as such:
However the compiler tells me
Constant parameters cannot have a default value
. Which is weird, because all that should matter is if it is constant or not, and the argument I put there is definitely constant. Doesn't seem like a problem.Solution
Allow constant parameters to have constant default values.
Beta Was this translation helpful? Give feedback.
All reactions