-
Notifications
You must be signed in to change notification settings - Fork 5
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
Questions about ExprKind
#11
Comments
Some possible base types
|
This dates back to 3fdd73d, which added an In theory this distinction is still meaningful, but I was never quite certain that the
At a practical level, the ergonomic consideration of (1) is code like: let x: i64.= match expr {
ExprKind::Integer(x) => x,
_ => todo!()
}; versus: let x: i64 = match expr {
ExprKind::Number(Number::Integer(x)) => x,
_ => todo!()
}; The second case is slightly more verbose, which could add up significantly when writing larger programs that deconstruct
I think it's plausible that additional "validated" variants could be added to A hypothetical |
I think using api like Nested structural easier to implement features like serde. |
I don't quite understand the structure of ExprKind.
ExprKind<E = Expr>
, canE
be any other structure?Number
directly.NumbericArray
,Association
I mean something like this:
The text was updated successfully, but these errors were encountered: