Could we provide a more flexible get<>
and at<>
API?
#2543
Replies: 4 comments 11 replies
-
If such API is acceptable, I could prepare a pull request for that. |
Beta Was this translation helpful? Give feedback.
-
Also for |
Beta Was this translation helpful? Give feedback.
-
Can you provide some code snippets that demonstrate the usage of this API? BTW, there is a "Ideas" category at Discussions which seems to be meant for submitting proposals. |
Beta Was this translation helpful? Give feedback.
-
I don't see how the newer version is any more concise or self-explaining. It doesn't remove the need for
It has the additional downside that it muddies the definition of The current method is not something that is difficult or wordy to do. |
Beta Was this translation helpful? Give feedback.
-
What is the issue you have?
(I didn't see a "feature request" category when opening a new issue thus I post this ticket as a "bug report")
I'm wondering could we provides a more flexible
get<>
(get
with key) orat<>
(at
with type parameter) API like:I have notice we already has
get
with type parameter but without keyat
and[]
with key but no type parametervalue
with key but requires a typed default value.I think the new API above would provide great convenience.
Please describe the steps to reproduce the issue.
None.
Can you provide a small but working code example?
None.
What is the expected behavior?
As the description of this issue.
And what is the actual behavior instead?
No such API.
Which compiler and operating system are you using?
None.
Beta Was this translation helpful? Give feedback.
All reactions