Should "std.net.curl" be moved from Phobos to Deimos?

H. S. Teoh hsteoh at quickfur.ath.cx
Mon Nov 25 22:53:12 PST 2013


On Tue, Nov 26, 2013 at 06:44:03AM +0100, Jesse Phillips wrote:
[...]
> I don't think I understand having to build dmd just because you have
> a different distribution, Phobos maybe but dmd... Even for Phobos
> I'm skeptical but am not going to install a different distro to
> experiment myself.

If you have used enough Linux distros (or even different versions of the
same distro!), you will realize that all it takes is for a single shared
library on the system to be a different version, missing, or just the
same version built with different compiler flags, and the executable
will not work. Not to mention that filesystem layout can be different
across distros (and versions of the same distro), which will break
things.

Basically, to guarantee a program runs on distro X, the only way is it
has to be built from source. If you're lucky, somebody else has already
done that, and you can just download the binary. (Or better yet,
somebody packaged it for your distro, then you can just install it via
your system's package system.) But if not, you'll just have to do it
yourself.

Copying an executable from one Linux box to another is generally a bad
idea. If it runs at all, there's a chance that it is actually subtly
malfunctioning. I've seen heisenbugs that have no representation in
source code, but show up when you run an executable in an environment
that's close to, but not quite, the environment it was built on.
Rebuilding from source (often with exactly the same commands, same
compile flags, etc.) makes the problems go away.


> If it is moved to a third party library, the problems will still
> remain. If the Phobos team is expected to support it, then the
> burden hasn't shifted either.

This I agree with. However, it misses the point. The point is that the
core D toolchain (dmd/phobos/druntime) would have one less dependency,
which is generally a good thing, because you want to make it as easy as
possible for people to get a working compiler up and running.  Requiring
this library and that library and that other tool, just to get a bare
bones D toolchain working, is a good way to turn people off D. If a bare
bones D compiler is actually working, then they'd have more incentive to
actually put in more effort to make the frills work too. Having a hello
world program be uncompilable just because libcurl isn't available, is a
very bad first impression ("why does this stupid language need libcurl
just to compile a hello world program?!").


T

-- 
EMACS = Extremely Massive And Cumbersome System


More information about the Digitalmars-d mailing list