-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
enhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requested
Description
We support type puns...
abi-cafe/include/tests/procgen/pun/MetersU32.procgen.kdl
Lines 4 to 15 in 6a7db03
| pun "MetersU32" { | |
| lang "rust" { | |
| @repr "transparent" | |
| struct "MetersU32" { | |
| _ "u32" | |
| } | |
| } | |
| lang "c" "cpp" { | |
| alias "MetersU32" "u32" | |
| } | |
| } |
Why not function puns?
fun "sick_call" {
lang "rust" {
fn "sick_call" {
inputs { _ "[u64; 2]"; }
}
}
lang "c" "cpp" {
fn "sick_call" {
inputs { _ "u64"; _ "u64"; }
}
}
}I'm not sure exactly when we'd want this, but I wanted to write it down.
As with puns, there needs to be restrictions that allow us to keep the ValueTree in sync across puns. In the case of ValueTree we require there to be an equal number of Values (primitives + enum tags) produced (so [u32; 2] can pun (u32, u32), but u64 can't). So the above example might be an invalid fun.
A more realistic fun might be "varargs vs not".
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requested