News for hackers. Stuff that matters.
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).
Re:My Vision of D’s Future by BubRoss on Tuesday October 15, 2019 @11:29AM (#21259477)
Why can't D create static binaries? I've never heard that before.
Re:My Vision of D’s Future by arunc on Tuesday October 15, 2019 @01:34PM (#21261227)
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.
Re:My Vision of D’s Future by floatboth on Tuesday October 15, 2019 @05:07PM (#21263780)
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

Re:My Vision of D’s Future by pjmlp on Tuesday October 15, 2019 @02:00PM (#21261584)
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.

Re:My Vision of D’s Future by Neku42 on Tuesday October 15, 2019 @03:44PM (#21262835)
You 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