Ability to take address of parameters #4312
Closed
alexover1
started this conversation in
Ideas/Requests
Replies: 1 comment
-
The reason for this is that Odin can choose to pass the parameter by reference, if you allow taking the address of that you would be able to change the value of the caller's version of the value which is not what you want. We also don't want to automatically do |
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
-
Procedure parameters are currently not allowable to take the pointer address of. This makes sense, because they are not modifiable. However, there are some cases where it would be useful, and could avoid a useless copy.
What about allowing taking the address of #by_ptr parameters?
Beta Was this translation helpful? Give feedback.
All reactions