On 11/18/19 1:19 PM, Tobias Pankrath wrote:
On Monday, 18 November 2019 at 19:54:38 UTC, Russel Winder wrote:

Probably yes. Though Cargo has taken many different decisions to Dub and mostly I think Cargo took better decisions.

Could you elaborate a bit, please? I am not familiar with Cargo though.

See also Russel's previous post on this issue [1]:

Go and Rust emphasised using Git, Mercurial, and Breezy repositories as 
packages from the outset. Go chose not to add a central repository, Rust chose 
to add one. Rust's choice was the correct one for supporting developers. In 
hindsight, Go has had problems with packages from the outset based on the 
initial workspace model. Slowly over the decade Go is finding ways forward. 
Rust got it right from the beginning, once they had stripped down the standard 
library and emphasised use of the central repository – if only Phobos could be 
stripped right back to the absolute necessary and everything else provided via 
the central repository. Obviously not all is good in Rust-land, just as with 
Python and PyPI, the central repository is not curated, and this leads to 
horrible messes. Ceylon got this more right, but it is a language few have 
heard of and even fewer use.

Dub does not allow for use of Git, Mercurial, or Breezy repositories only the 
uncurated (and therefore potentially problematic) central repository. OK so you 
can do Git checkouts as a separate activity and use local filestore references, 
but this is not feasible for packages in the central repository.

Dub builds packages to a location outside the project being worked on. Cargo 
pulls sources to such a central non-project place and then compiles into a 
project specific location. Dub tries to store all compiled version out of 
project in the same area as the sources. Does this matter? Isn't Dub making 
things easier to share? Sort of, sort of, and no. Dub stores all compilations, 
but hides them and presents only the last compilation easily. This makes things 
hard to work with for non-Dub tooling. Cargo makes it a lot easier, at the 
expense of lack of sharing but always compiling everything into the project 
area.

Cargo uses TOML, Dub uses SDL (or if you are masochistic JSON). 'nuff said.
QED.

Dub seems to have become the de facto, and indeed de jure, standard for D 
build, and yet somehow Cargo is just assumed by all Rust programmers whereas 
Dub is a source of contention and ill-will in the D community.

Dub's biggest problem is that there are many in the D community who will not 
use it – and they are vocal about it. The solution is not censorship, the 
solution is for Dub to evolve very rapidly so that these vocal people have the 
rug pulled from under them, i.e. their complaints become invalid.

[1]: https://forum.dlang.org/post/[email protected] (scroll toward the end of the post)

Reply via email to