4 ms·
> Not to mention that it means on a large team project everyone one is compiling the same stuff over and over again, That's a bit dramatical. You typically onl
by josteink 7y ago
> Not to mention that it means on a large team project everyone one is compiling the same stuff over and over again,
That's a bit dramatical. You typically only compile your dependencies once during the project lifetime.
If you on your netbook have done a initial full build, you'll only get incremental builds from there on, just like with C++.
But unlike C++, dependency management isn't hell, and you are almost always guaranteed to have your dependency supported on the target you are building, OOB, without any fiddling or setup.
It's a trade-off, but I definitely think the Rust-team made the right decision here.
- pjmlp 7y agoDependency management isn't an issue when using OS packages, and Conan also does binary dependencies. Compiling from source also does not solve the problem that a crate author hasn't taken a specific OS into account. Yes I am being a bit dramatic, but this kind of issues do impact adoption, and there are many industries where shipping source is just not an option.
- josteink 7y ago> Dependency management isn't an issue when using OS packages Come on. What do you find most developer friendly? 1. "cargo build && done" or 2. Try to uncover what dependencies this project really has, and then proceed to map out what the packages (and dev-packages) for those dependencies are called on the linux distro you are using (debian, ubuntu, fedora, arch, etc), not to mention what they are called on your specific version of that distro, root up, install all that stuff.... and then try ./configure yet again? > but this kind of issues do impact adoption Indeed. In 2020 I wouldn't bother adopting any kind of language which prefers the latter flow to the former one.
- pjmlp 7y ago"cargo build && done" only works if every crate author has taken my OS into consideration and not used OS specific API or file locations. And it is more like "cargo build && off to lunch". I am usually on Windows, and most commercial vendors nicely sell us their already compiled binaries. No need to hunt for anything. Regarding Linux distros, if it isn't on the official repositories, Conan provides exactly the same experience as cargo, only faster because it supports binary libraries.
- josteink 7y agoAnd how many C/C++ projects use Conan by default, versus those who don't? For comparison all rust projects uses cargo. The ergonomic value of that is something you simply can not overstate.
- pjmlp 7y agoFor many users of AOT compiled languages, the ergonomic factor is being able to enjoy fast builds, without getting a compiler rig. Turbo Pascal 7, which was already relatively complex, was already compiling several thousand lines per minute on a single core 4Mhz computer bounded to 640KB. More modern examples with complexer type systems, are languages like Delphi, FreePascal, Ada/SPARK, D, F# via .NET AOT, OCaml. So yeah cargo is nice, but not if I have to build everything from scratch, Rust isn't a scripting language.
- fnord123 7y ago>So yeah cargo is nice, but not if I have to build everything from scratch, Rust isn't a scripting language. FWIW, Rust builds faster than node applications as my laptop can only handle so many iops. And Rust compiles are in line with Ocaml (probably faster by now due to the optimization work over the past year)
- adev_ 7y ago> But unlike C++, dependency management isn't hell There is nothing hell into C++ if you are using the right tools: meaning proper package manager, meaning Nix/Guix, Conan or Spack. It is currently much more hell to integrate Rust+Cargo behind other build system ( behind pip/gem/npm for instance ) than it is with C++.
- pjmlp 7y agoI think you wanted to reply to the upper comment. :)
- fnord123 7y ago