digitalmars.D - D Libraries and binary compatibility
- Vincent Lang (19/21) Mar 04 2005 I guess D also wants to support libraries written in D, of course
- <Altair_liu hotmail.com> (2/7) Mar 04 2005
I guess D also wants to support libraries written in D, of course exporting D language bindings (with classes and all). How does D do this? I hope it doesn't like C++, because there you have a big mess. I.e. you must be very careful in modifying existing classes to not to break binary compatibility to earlier versions of a library. Look on this: http://2f.ru/holy-wars/fbc.html Please note what braindead tricks these poor C++ developers have to do to keep it upwards compatible. I think these reserved virtual functions are especially funny... Now, with D this could get even worser, since the D manual says:The D compiler is free to rearrange the order of fields in a class to optimally pack them in an implementation-defined manner.So D libraries couldn't get ever compatible to anything, since the concrete layout could even depend from compiler switches. How is this solved? Is it solved at all? Btw: I also saw there seem to be "import modules". Hm, look like header files. My proposal would be to generate these modules from the library binaries, or better: let the compiler access these binaries instead of parsing the import module. Vincent
Mar 04 2005
I think this is very important and convenient for developers. "Vincent Lang" <jvjgh web.de> write :d0a6lk$1lqe$1 digitaldaemon.com...Btw: I also saw there seem to be "import modules". Hm, look like header files. My proposal would be to generate these modules from the library binaries, or better: let the compiler access these binaries instead of parsing the import module. Vincent
Mar 04 2005