Spaghetti currently supports external interfaces, but not external structs which seems like an arbitrary limitation.
It would be sensible to introduce the notion of an arbitrary external type:
We could allow to use external types in arbitrary positions, e.g.
interface BarSub extends ns.foo.Bar {}
however this might mean that if ns.foo.Bar is not of an appropriate kind in the host environment, the error is only detected after the headers have already been generated and the host language compiler runs.
So we could allow to specify the "kind" of an external type when declaring it, but extend this to struct:
extern interface ns.foo.IBar
extern struct ns.foo.SBar
We could still allow for types of unspecified kinds as
which can only appear in member or function declarations.
Spaghetti currently supports external interfaces, but not external structs which seems like an arbitrary limitation.
It would be sensible to introduce the notion of an arbitrary external type:
We could allow to use external types in arbitrary positions, e.g.
however this might mean that if
ns.foo.Baris not of an appropriate kind in the host environment, the error is only detected after the headers have already been generated and the host language compiler runs.So we could allow to specify the "kind" of an external type when declaring it, but extend this to
struct:We could still allow for types of unspecified kinds as
which can only appear in member or function declarations.