You can (try) yes. Have you tried it? I have. It was a horrible experience. Support for making standalone binaries is an afterthought in the Python world. It is usually not a simple process that "just works" (on Windows in particular).
>I regularly use Rust (nightly) in Windows
I know a guy who managed to write a game in Ruby and somehow turned the code into standalone Windows binaries. I know that Rust can be used on Windows, that you can use it to build standalone binaries, that is not the point. The point is how well, idiomatically, and smoothly that works.
>Windows support is problematic since it differs from every other major platform
If you do not consider consoles or embedded systems major platforms that is. Most of the world is not POSIX.
>does not require the C compiler at all
The last time I tried to use Rust on Windows it required a particular version of MinGW.
>Dependency problem is so bad in C/C++
I have used C and C++ for a long time, and I cannot say that dependency hell was ever a problem. One of the many things wrong with the "package manager" paradigm is that it encourages people to write software which is a tangled web of dependencies. Software should have few third-party dependencies, that makes maintenance and porting a lot easier. Witness the recent Python 2 -> 3 drama. The primary reason why people did not, could not upgrade to Python 3 was because they had to wait for all the dependencies of their apps to be ported. Many are still waiting.
I think that's a terrific case of "that's my use case and therefore it should be everybody else's too". Try writing a complex web business application with "few third party dependencies" while not reinventing the wheel at the same time. There are many cases where having many third-party dependencies is necessary and the right thing to do, because your customer is emphatically not paying you for writing a web framework, a REST routing layer, an ORM, a full-text indexing system, a logging system and an AMQP client. Attempting to sweep the problem under the carpet by saying "just don't have dependencies" is silly. The only thing to do is to design a dependency system that works.
You are right that my statement was too generalized, though. Yes, there are sectors where the "gluing together lots of libraries" style is the most practical one and "few third party dependencies" is not practical. However, there are already languages for that, and nobody is waiting for Rust to replace Ruby.
As for Rust replacing Ruby, why not? It is a general-purpose language, it eschews a lot of the C/C++ verbosity, lack of memory safety and weak typing which make them such a pain. I could see it easily as a strong contender in the web platform department once it matures.
There are a bunch of us Rubyists in Rust-land, actually. My "Rust for Rubyists" was one of the biggest early community tutorials. And a Rust extension to Ruby in Tilde's Skylight product is the third production deployment of Rust ever.
Rust will not exactly 'replace' Ruby for me for a while, but I can see a day where that's true.
Presumably there's a significant amount of software that both is library-heavy and would benefit from being faster-than-Java, enough so to make some extra memory management worthwhile? If the reason that such software is getting written in Java etc. instead is because dependency management is too unpleasant in C++, well then that right there is the case for something C++-like but with good dependency management.
I've done it many times, and it is not quite bad to do that (it can even give a single executable file at some initial slowdown). In fact, it is so impressive that the non-compiled implementation can make a working and portable executable file at all. Rust is primarily a (ahead-of-time) compiled language and it would take a single command `rustc foo.rs` (or possibly `rustc -L<deps> foo.rs`?) to produce an executable file `foo.exe`. [1]
[1] Assuming you haven't used 0.9 and later versions, it now produces a statically linked binary by default. No `libblahblabla.dll` around.
> If you do not consider consoles or embedded systems major platforms that is. Most of the world is not POSIX.
It really depends on the definition (and I'm not saying POSIX is not the most widely available platform), but mobiles alone (approx. 300 million units sold) give a significant portion of POSIX systems.
> The last time I tried to use Rust on Windows it required a particular version of MinGW.
You haven't used 0.9, right? That restriction was temporary and it has now lifted. I think you still need MinGW for linkers right now though.
> I have used C and C++ for a long time, and I cannot say that dependency hell was ever a problem. One of the many things wrong with the "package manager" paradigm is that it encourages people to write software which is a tangled web of dependencies. Software should have few third-party dependencies, that makes maintenance and porting a lot easier. Witness the recent Python 2 -> 3 drama. The primary reason why people did not, could not upgrade to Python 3 was because they had to wait for all the dependencies of their apps to be ported. Many are still waiting.
Python 3 is a bad choice in my opinion as it hasn't learned from the precedent of Perl 6 "failure" (this was finally resolved when Perl 5 development has been restarted). But that does not justify the C/C++'s lack of package system: there are lots of old and faulty C/C++ codes around due to the lack of recent C99 or C11 or C++11 compilers at the disposal even without the package system.
I think they suffer from opposite issues. Perl 6's problem is that it was way too ambitious for the manpower behind it, and it turned into the Duke Nukem Forever of programming languages. The issue with Python 3 was that it introduced breaking changes, but was widely felt not to bring enough to the table to warrant these changes.
"One of the many things wrong with the "package manager"
paradigm is that it encourages people to write software
which is a tangled web of dependencies. Software should
have few third-party dependencies, that makes maintenance
and porting a lot easier."
Or it means that you can share the fruits of your porting with others.If you and I work on a project that depends on module foo, only one of us needs to port foo to platform bar once for both of us (and everyone else) to gain compatibility with platform bar with respect to our dependencies.
What you want instead is a way to have package managers support defining cross platform modules so that bar doesn't have to be forked and published as an entirely separate module.
"The primary reason why people did not, could not upgrade to
Python 3 was because they had to wait for all the dependencies
of their apps to be ported. Many are still waiting."
Then the problem is a lack of tooling to aid with porting the code to the new platform. Creating a tool that parses code into an AST and analyzes the code to help define how it can be made compatible with the future version of a language should be a tractable problem for 1-2 developers.At the end of the day package managers are first and foremost social software whose role is to aid meatware in achieving eventual consistency. We've only begun to scratch the surface of what is possible in this respect.
Pull the source down, compile/link it and you're good. App A and B can run with different versions of libfoo, because they're statically linked so you're good to go if slightly wasteful of code footprint. If you're expecting to do runtime dependency lookup by dynamically fetching things through the package manager, then I agree, you're gonna have a bad time.
"If you do not consider consoles or embedded systems major
platforms that is. Most of the world is not POSIX."
Would you even use a package manager on an embedded system? I would imagine that a package manager is far more appropriate for development systems and systems capable of being used for development. An embedded system would probably use a much simpler install system like what is used in TinyCore linux, if not even simpler than that. In fact, I would expect the package management on an embedded system to be driven by another system, which may be POSIX compliant. That software that puts code on that embedded system or console could be an extension to an existing package manager.The biggest issue with most package managers AFAICT is that most aren't designed first as a platform with a programmatic interface. At the end of the day, the CLI for a package manager should be just one of the clients driving the package manager.
You'd generate some build artifact with the help of Cargo, and that's what you'd load onto your device.
Given how long it takes to build rust, I would hope a faster build system is a priority. Running `brew install rust` is bar none the longest build process I've seen in the brew ecosystem.
Huh? Python has a (sort of) package manager and you can still make a standalone application by bundling every dependency. You are very certainly mistaking the OS-level package manager (used primarily for installing applications) from the language-level package manager (used primarily for building applications). Once you have built a standalone binary, the job of the language-level package manager is done.
> However, C++ is a platform agnostic language, while Rust thus far has only supported Linux as a first class platform. I find the attitude of the Rust devs ("we will improve Windows support once the language is stable") deeply misguided. It meant that they largely missed out on feedback from Windows developers during the development of the language. "Windows developers" also means all the AAA PC(+console) game developers (the most diehard C++ users). Linux still is not a relevant platform there.
I regularly use Rust (nightly) in Windows. Windows support is problematic since it differs from every other major platform, but it did not have a serious problem that seriously discourages the Windows platform. (Not to mention that I regularly build a standalone binary for Windows!) I admit it is not in the best state, but it should be improved and is being improved.
> And the Rust developers seem to continue to go down that rabbit hole by enlisting Ruby developers to develop a "package manager". As a Windows guy the very word makes me cringe. How is that thing going to integrate with Visual Studio and other Windows specific concerns? Ruby only really works on Linux, first advice you get as a Windows guy wanting to learn Ruby is "Install Linux, if you try to do Ruby development on Windows you are in for a world of pain". I do not trust any Ruby developer to write portable software, they are married to the GNU/Linux ecosystem. Would you expect Microsoft guys to develop something which actually works well on Linux?
As a multiplatform guy the introduction of package manager actually marks the divorce with the strong Unix assumption, since Rust has actively avoided the platform-dependent tools so much that it now does not require the C compiler at all (!) and the only remaining platform-dependent tool was the Make. This is now about to change.
> Also remember that C++ does not have a "package manager". Some of the most complex and massive applications in the world are written in C++, yet you do not hear many C++ developers crying "When will we finally get a package manager?". It is not even on the agenda. C does not have one either.
That's why SQLite ships with an amalgamated source code, a sort of unfortunate thing. Dependency problem is so bad in C/C++ that most developers gave up and grew the half-baked solutions, which have another share of problems.