-
Notifications
You must be signed in to change notification settings - Fork 3
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
Spread map values #6
Comments
Hi, I'm wondering if this is a common enough use case to warrant the (a) internal complexity; (b) maintenance; and (c) cognitive/documentation aspect. |
It would not add significant complexity in the parsing. But yes, it could make the generated code more complicated (and potentially slow) if we decided to do checks to make sure the keys and values are the same length. If we forgo the length check, and behave exactly like the
I'm inclined towards just truncating the values, as would happen with manually doing a |
As for documentation, there is still a lot of work to be done there. But I think it could actually simplify docs because we can say that |
After getting some 'familiarity' with how velcro uses |
Currently
..
is supported in maps for keys, but not values. It would be nice to be able to do this:Which would give the same result as:
May need to consider if it is an error if the number of keys exceeds number of values or vice versa.
It doesn't really make sense to spread values when the key is not also spread, so this should be an error:
The text was updated successfully, but these errors were encountered: