-
Notifications
You must be signed in to change notification settings - Fork 2
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
What else can it do? #2
Comments
This would conflict with field punning. |
|
I don't mind, it just might be a cool feature |
We might use |
Alright, cool |
I'd be more into this if there was a way to make it automatically fill in defaults for all remaining fields: {
a: false,
b: 0,
c: "",
d: None,
e: 10
} would be {
e: 10,
??
} But the main reason I want this is for implementing default on large structs, so I'm not seeing another good way to do it |
All good ideas! I don't really mind |
Uh, i wish that was possible. Sadly syn crate is not that flexible. We would have to reimplement the entire parser for this as far as i am aware. Function-like macros are the only way i can think of that would be maintainable. |
Ideally I think what having the usage being |
There is one issue, that aims to simplify writing |
I mean, we could, but why bother? The purpose of the "naked |
Yes, i was silly there actually. We could just add a helper function named |
Edit above: made my saying clearer |
Would be cool if we could have something like:
which autodefault could solve I suppose. Maybe making it so you could do:
aws, battery
etc.
The text was updated successfully, but these errors were encountered: