One Year with Rust: I wrote a full featured application in rust, and so can you
vitiral.github.io
vitiral.github.io
Anyway rust is awesome, especially cargo (finally sane build/package management/versioning for a systems language). I will never code in c++ again if I can help it.
(This link will change in one or two releases; I landed a new "Unstable Book" a few days ago.)
The TL;DR is Rust expects certain stuff to be implemented in Rust code to work, and that's provided by the standard library. When you don't use the standard library, libcore implements all but a few of them. Implementing them is not yet stable.
https://github.com/rust-lang/rust-roadmap/issues/15 is the roadmap item for some things relating to this; id you want to chime in with your pain points here, that'd be very helpful!
Rightfully? People resort(ed) to "C with classes" to make C++ tolerable and/or reliable.
If anything, it's the opposite: when most people complain about C++ it's about C++ itself, the full language, and its whole baggage of features and their obscure interactions and intricacies. Not about using C++ as C with classes.
My problem is honestly that Cargo has spoiled me. C (& C++) may indeed have more libraries; but adding them to a project is a non-trivial exercise.
Assuming your project subscribes to the "build it with one command" philosophy then:
- You'll need to install the target project's build system
- You'll need to invoke that from your project's build system
- You'll need to copy those artifacts (which depends upon implementation details of their build system) to the right output directory (which depends upon implementation details of your build system.)
- Then finally you get to include the headers complete with ifndef guards. (Honestly it's getting increasingly more difficult for me to even tolerate C/C++ header files.)
- P.S: probably repeat this list for every target platform you build on.
---
When installing a package takes a single line of configuration, or a single command, I am far more likely to ignore my "not invented here shoulder-demon" and just add a 3rd party dependency. In C/C++ I actively avoid adding dependencies, regardless of how numerous they may be.
Getting there might be a challenge sometimes, especially when you're just starting. But believe me learning Rust is worth the trouble.
Anyone like that here that could share his story?
This doesn't answer your question, but rust is looking really good in the benchmarks game lately: http://benchmarksgame.alioth.debian.org/u64q/rust.html
They're different levels of abstraction and I think are both great languages that serve different use cases.
I'm always going to be more productive in Python. And Python has an awesome ecosystem for web apps. Rust gives you native compiled binaries, concurrency, and speed in general.
Why you'd consider these two languages for the same app is beyond me.
Another example is the rayon library which is incredibly succinct compared to the multiprocess module in python.
Unlikely. Python, Ruby, PHP, Javascript all do not have in-process parallelism.
In contrast, C/C++, Java/Scala/Clojure, Go, and Rust all have in-process parallelism.
This just furthers seabrookmx's point that Python and Rust belong to two different classes of useful languages.
---
P.S. Python's multiprocessing module is an order of magnitude better/easier than anything in the other scripting languages I listed.
Anyone reading hackernews knows that Node doesn't have an issue with popularity (and AFAIK Python doesn't either).
Any bigger than that and rust is the right hammer for my nails. Probably just personal preference, but I strongly prefer the type safety and performance guarantees of rust.
I need the ability to share GPU data between front and back ends, along with accurate timings for the control of various hardware devices. This is possible with Java (think the design of MATLAB or Mathematica) but the additional glue to enable cross language communication doubles the code size. That is why I'm sticking to C++ and Qt.
I think they are JUST starting with some gui frameworks for rust,so I think the language is a little behind there. Never done extensive searching though
(I bring this up since using Elm was mentioned in the article)
One nice thing about rust is that everything is explicit. If someone can mutate your data, you have to pass "&mut" to them and declare your variable as mutable. This gives you a good balance of both performance and control.
It also has the benefits that make elm great like no exceptions, pattern matching, etc.
So ya, they are different languages but share a lot of the same concepts and benefits.