Am 09.06.2011 03:31, schrieb Andrej Mitrovic: > C libraries are great. They're flat and have little overhead.You can > build your own OOP/whatever-oriented interfaces around the library, > referencing just the functions that you need. Simple stuff compared to > some monsters like QtD.
You still have to generate/write the D bindings (and generating only works on windows) before you can use them. This may not be too hard in most cases, but certainly discourages newbies who just want to have ready to use libs. And in some cases it can be hard, like when non-trivial macros are used (like for some unix socket stuff), or when there are a lot of custom types (and you can't just generate the bindings but have to write them yourself). In these cases it may sometimes be easier to write the code in C, exposing an even simpler interface suitable for your needs and call your own C functions from D (that's what I've done for aforementioned unix socket stuff: passing socket/file descriptors to another process needs those cmsg macros and structs). But stuff like this probably discourages newbies even more, especially when they're not coming from C/C++ but Java or Python or something. Cheers, - Daniel