Reflections on using Go instead of D

jfondren julian.fondren at gmail.com
Tue Jul 12 13:31:56 UTC 2022


On Tuesday, 12 July 2022 at 12:42:50 UTC, Adam D Ruppe wrote:
> This generally isn't worth the effort. Just using the oldest 
> glibc you want to support and dynamic loading openssl will 
> generally achieve the same task

This is very fair, but with Go *my* effort is minimal enough that 
it's worth it to not deal with the problem at all, and it's not 
zero-effort either to use the oldest glibc I want to support. If 
I had a legitimately old system I'd have to find an old enough 
dmd to work on it, and building an old glibc on a new system 
sounds like a pain: 
https://www.lordaro.co.uk/posts/2018-08-26-compiling-glibc.html

Still, this probably would've worked out a lot better than trying 
to work with static D.

> idk maybe it is just my system but this is an out-of-the-box go 
> install with all the default settings:

Is that OpenBSD? On some platforms Go gave up on static builds 
because the ABI was too unstable (OpenBSD) or wrong for other 
reasons (macOS). On Linux the default is "not a dynamic 
executable", and you'd have to pull in a C library dependency to 
break that.

> BTW one of the problems with ssl is you also need the 
> certificates... it is unlikely to work correctly with a 
> self-contained static build anyway. I wonder just how Go does 
> it...

It cheats and grabs system certs from standard locations.


More information about the Digitalmars-d mailing list