6 ms·
Good post. I haven't used D much, but the only way I really see it as "deficient" is its inability to easily create static binaries, like Go. But in a lot of wa
by snagglegaggle 7y ago
Good post. I haven't used D much, but the only way I really see it as "deficient" is its inability to easily create static binaries, like Go. But in a lot of ways that is never a hard requirement (it is nice, though).
- BubRoss 7y agoWhy can't D create static binaries? I've never heard that before.
- arunc 7y agoI have never heard of that before. I create and link static libraries all the time. My exes are usually a drop in without any dependencies whatsoever.
- snagglegaggle 7y agoSorry -- it can, but in much the same way GCC does. You need to manage all your deps. With go it just happens, a huge time saver.
- floatboth 7y agoI'm pretty sure Dub will happily manage your D deps and compile them statically. But I appreciate how that's not necessary and I can use only system-installed libs with Meson and pkg-config :P
- pjmlp 7y agoThere is no issue creating static binaries.
- Neku42 7y agoYou totally could create static libraries or compile stuff statically inside binaries to create a go style standalone executable but you need to recompile Phobos as a static lib for that
- he_the_great 7y agoI think D is still working through lack of support for dynamic libs (lots of headway was made so I may be wrong) It is funny how Go sold it as a feature, but it was always a deficiency in D (and yes, it just happened out of the box.) That isn't to say C dynamic libraries didn't work, that is a linker thing, but it would be the same in Go.
- zombinedev 7y agoYou're mistaken. By default D statically links all D dependencies (leaving only libc and possibly OpenSSL (if you need it)) to be dynamically linked (which has it's advantages), but if you want you can statically link all dependencies (including the C ones), just like you can with C or C++. D produces the same format of object files as C/C++ which makes this just as easy.