On Wed, Jan 09, 2013 at 03:49:33AM +0100, Rob T wrote: > On Tuesday, 8 January 2013 at 23:30:34 UTC, David Nadlinger wrote: > >On Tuesday, 8 January 2013 at 23:12:43 UTC, Rob T wrote: > >>The only major thing that concerns me is the lack of proper > >>shared library support. I hope this omission is resolved soon. > > > >What do you need it for? Runtime loading of D shared objects? Or > >just linking to them (i.e. binding by ld/dyld at load time)? I'm > >trying to collect data on real-world use cases resp. expectations > >right now. > > > >David > > I *really* need runtime loading of plug-in code for a server > application. This allows the server code to remain untouched while > allowing extensions to be added on by a 3rd party. > > Runtime linked shared libs are also nice to have for the simple > reason that shared libraries can be updated (to a point) without > having to rebuild and relink all applications that make use of the > libraries. There are pros and cons to static vs dynamic linking, but > definitely both are useful to have. > > I'm very surprised that not too many people have been screaming for > dynamic linking and runtime loading. It's very hard for me to > imagine not having the feature because it's so darn useful and an > essential feature if your strategy is to allow 3rd parties to extend > an application without hacking at the source code.
I haven't been screaming yet because (so far) I haven't gotten to writing applications that need dynamic loading in D. But I did tell myself that I will be screaming when I do get to it, because it's a pain to have to recompile the entire application just to add a single addon. > If there's another better way, I'd sure like to know about it! [...] Another way, yes. Better, I don't know. You *could* load plugins as separate processes and communicate via some kind of IPC mechanism, like Unix pipes. But that's a royal pain (requires serialization / deserialization, with the associated overhead, and a network stack or equivalent, just to interface with each other). T -- Latin's a dead language, as dead as can be; it killed off all the Romans, and now it's killing me! -- Schoolboy