On Thursday, 16 August 2012 at 14:58:23 UTC, R Grocott wrote:
http://michelf.ca/blog/2009/some-ideas-for-dynamic-vtables-in-d/
The above blog post, written in 2009, proposes a system for
solving the Fragile ABI Problem in D. Just wondering whether
anything like this is a planned feature for druntime.
C++'s fragile ABI makes it very difficult to write class
libraries without some sort of workaround. For example,
RapidXML and AGG are distributed as source code; GDI+ is a
header-only wrapper over an underlying C interface; and Qt
makes heavy use of the Pimpl idiom, which makes its source code
much more complex than it needs to be. This is also a major
problem for any program which wants to expose a plugin API.
It would be nice if D could sidestep this issue. It's
frustrating that C is currently the only real option for
developing native libraries without worrying about their ABI.
The is only so, because in most mainstream OSs, the C ABI is the
OS ABI.
If you make use of an OS written in, lets say Modula-2, then the
OS ABI
would be a Modula-2 ABI, which even C would have to comply to
somehow.
I think z/OS, if I'm not mistaken on the OS, is one of the few OS
where
you have a good ABI across multiple languages.
This is similar to what Microsoft somehow tries to achieve with
COM and .NET.
--
Paulo