-
Notifications
You must be signed in to change notification settings - Fork 15
feat: smithy for virtual fields #71
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
Conversation
structure VirtualTransform { | ||
@required | ||
transform : Transform, | ||
numbers : NumberList, | ||
strings : StringList, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other way to model this would be via a union:
union Transform {
upper: Upper(),
lower: Lower(),
insert: Insert(string str),
prefix: Prefix(int len),
suffix: Suffix(int len),
substring: Substring(int start, int end),
...
}
I think this is the more "correct" way to model this, as we can exactly express the inputs to each transform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree completely.
* feat: smithy for virtual fields * use union for Transform * zero-based plus GetSegments
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.