this might sound weird,
but I was thinking about modules proposal and wondered if it is possible for example that in future Haskell code could be exposed (as a module) in a way that C++ can use it(lets say list of T in
Haskell maps to vector<T>).
So do modules make that easy, possible, or it is no change compared to current status (C++11)?
this might sound weird, but I was thinking about modules proposal and wondered if
Share
It’s possible but I doubt it will make things easier. My understanding is that the binary format of the information exported from modules would be compiler-specific, so it wouldn’t provide a common ABI shared by all compilers on a platform. The reason C is used as the glue between languages is that the C ABI on most platforms is pretty simple and is fixed, so it’s not a moving target. C++ implementations need a much richer ABI (name mangling format, exception hierarchy, object layout, vtable layout, RTTI representation etc.) and modules won’t change that.