Replies: 3 comments
-
@lydiandy I don't get what you mean. Can you tell me when will this be useful and how? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I think he wants to access and modify a struct's field with the syntax of an array index.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
I think V won't have runtime reflection (at least by default). Instead you will be able to generate statements at compile-time: $for field in Person.fields {
mary.$(field.name) = person.$(field.name)
}
// same as:
mary.name = person.name
mary.age = person.age
... |
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
-
can we have the struct field dynamic assign ,like this:
Beta Was this translation helpful? Give feedback.
All reactions