Accessing vortex_expr::expr::Expression children shouldn't involve explicit indices #5926
danking
started this conversation in
Feature Requests
Replies: 1 comment 2 replies
-
|
This looks great. The problem with taking: If you want to return an the input expression you cannot without a clone? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently to get the children of Between you need to know the mapping from indices to children:
Having named methods is discoverable (via auto-complete) and avoids a footgun (e.g. is the array child first or last?). We could even say the ordering of individual children is not public and you must access them via their names. That lets us reorder, though I have no reason to think we want to do that.
Concretely:
And we can use it like:
Beta Was this translation helpful? Give feedback.
All reactions