Hello, The nice thing about SMOBs is that they allow disjoint C types to be mapped to disjoint Scheme types.
With ‘(system foreign)’, C pointers are mapped to Scheme foreign objects, regardless of the type of object pointed to. Thus, to get disjoint types in Scheme, foreign objects would need to be boxed in structs (since structs are the only way to create disjoint types from Scheme). If this analysis is correct, the resulting code may be somewhat inefficient since we end up boxing C pointers twice. Is this correct? Thoughts? Thanks, Ludo’.