Replies: 1 comment
-
|
Good callout. Value enums were one of my earliest decisions when first building bindgen; this model where they're transparent with their underlying primitive needs revisiting. Turning this into an issue: #547 Edit: Sorted at #547 (comment) |
Beta Was this translation helpful? Give feedback.
0 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.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently
bindgenhas some special privileges, not allowed in "normal" lisette code. Specially for the enum type, as it can have concrete values not allowed in user-land.As an example from
time.d.lisThis allows for good go -> lis -> go interop, but also misses the opportunity to be more type safe, meaning the type is (in the
time.timecase) still just anint, allowing for UB, as an example:Every go const + iota should be possible to infer at compile time, as only const expressions are valid, so i think there should be a high possibility to have lisette infer all valid uses, and not resort to a primitive like
inton the lisette side. There are definitely edge cases here, but i think this could be something to explore further.Beta Was this translation helpful? Give feedback.
All reactions