-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Milestone
Description
Instead of the following generated code:
pub const Instance = enum(usize) { null_handle = 0, _ };we can make use of opaque types:
pub const Instance = opaque {}; // maybe *opaque {}?This improves type safety with explicit nullability in generated code, and makes it easier to use with other C APIs that expect an opaque pointer. For example the instance argument in destroyInstance is not obviously nullable until you read the Vulkan spec, and null is obviously cleaner than .null_handle. This seems like a missed opportunity.
kulkalkul and Cloudef
Metadata
Metadata
Assignees
Labels
No labels