Re:My Vision of D’s Future
by snagglegaggle on Tuesday October 15, 2019 @11:05AM
(#21259182)
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).
[ Parent
| on HN ]
Why can't D create static binaries? I've never heard that before.
I 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.
Re:My Vision of D’s Future
by snagglegaggle on Tuesday October 15, 2019 @03:59PM
(#21262983)
Sorry -- 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.
I'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
There is no issue creating static binaries.
Re:My Vision of D’s Future
by zombinedev on Thursday October 17, 2019 @04:01AM
(#21279870)
You'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.
Re:My Vision of D’s Future
by he_the_great on Thursday October 17, 2019 @01:36AM
(#21279186)
I 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.