Pathing in the D ecosystem is generally broken (at least on windows)

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Fri Sep 25 09:30:03 PDT 2015


On Friday, 25 September 2015 at 16:06:44 UTC, Kagamin wrote:
> I suppose, PATH variable on windows works the same as on unix? 
> And path hell can be easily reproduced on unix too. Nothing 
> windows-specific here.

AFAIK, PATH on Windows works basically the same as it does on 
*nix, but a big difference is that on *nix, there are generally 
some very specific places where programs go, and almost nothing 
needs to touch PATH - e.g. a binary is usually going to be in 
/bin, /usr/bin, or /usr/local/bin, all of which are likely to be 
in your PATH variable. And if you installed something as your 
user, then you'd generally put the binary (or a symlink to it) in 
~/bin. Windows really doesn't have anything like bin. Everything 
gets installed in its own directory (usually under Program 
Files), and if you want it to be usable on the command line, you 
have to add it to PATH. And since all of these programs are 
separate, they can have executables with the same name (e.g. 
link.exe), whereas that's much less likely on *nix, because 
almost all executables get installed to one of a few bin 
directories. So, you won't even end up installing conflicting 
binaries, because they'd overwrite each other.

I really don't know what the "correct" way to deal with this is 
in Windows, but the way that it's set up does seem to naturally 
cause more problems with PATH than you typically get in *nix.

- Jonathan M Davis


More information about the Digitalmars-d mailing list