5 ms·
How mature is Rust and its compiler actually at this moment? Is it in a state ready to replace C++? Edit: Also, I missed a good overview of features in one lan
by amelius 12y ago
How mature is Rust and its compiler actually at this moment? Is it in a state ready to replace C++?
Edit: Also, I missed a good overview of features in one language and lacking in the other.
In that respect, I find the wikipedia page [1] deeply broken, but that aside.
[1] http://en.wikipedia.org/wiki/Comparison_of_programming_languages http://en.wikipedia.org/wiki/Comparison_of_programming_langu...
- crazypyro 12y agoFrom my experience, not even close, if only because the ecosystem around it has to continuously update their own resources/libraries or risk being left behind every new patch because the language is not even at a stable 1.0 point. Trying to figure out new things tends to be an exercise in reading obsolete code examples and then asking for someone in #rust on irc.mozilla.org to translate. Stuff that gets deprecated isn't well documented in my experience and one of the best resources I came across (Rust by Example) also contains a lot of out of date or deprecated features. Obviously, this is a side-effect of a rapidly evolving language that is still in pre-1.0 phase, but anyone going into it should be aware of the potential breakage that tends to happen at a fairly high clip at the moment.
- grayrest 12y agoDepends on what you mean by solid. It uses LLVM for all the codegen and perf is generally in line with C++. The core ideas around traits/borrowing/inference/mutablility have been stable for a while. What's not stable is everything around the core ideas. Many things are in flight at the moment in anticipation of 1.0 stability. The core collection libraries had a major refactor land last night. How error handling works got changed earlier this week. If you're interested in writing libraries for a new ecosystem, now is the time to get into the language. I've tried to get into Rust a couple times since the 0.4 timeframe and I couldn't keep up with the pace of change. My current attempt started at 0.11 and while there are steady chanes, I've found them to be manageable. If you want to have idioms and ecosystem relatively settled, hold off until the 1.2 or 1.3 timeframe (6 week cycles). I say this because a lot of the current RFCs are split between things that need to happen before 1.0 and things that need to happen after. This generally means the base functionality in-place for 1.0 with the sugar/convenience stuff to come later. I expect it'll take a few cycles after 1.0 before Rust settles into what most people are thinking when they think stable.
- StevePerkins 12y ago"What's not stable is everything around the core ideas. Many things are in flight at the moment in anticipation of 1.0 stability. The core collection libraries had a major refactor land last night. How error handling works got changed earlier this week." Huh? I'm seeing comments in this thread about people using Rust right now in production. How... why... what?!?
- steveklabnik 12y agoThere are two big deployments and some smaller ones. The two big ones are OpenDNS and Skylight.io. We don't recommend it currently, but some people are just eager. :)
- grey413 12y agoI would venture to guess that those organizations feel that the pains of working with a prototype is worth the payoff of shaping the final product (not to mention the immediate advantages of rust's already stable safety features).
- steveklabnik 12y agoYup. I know much more about Skylight's case, but this is exactly true.
- Dewie 12y agoSome people like to live dangerously.
- sanderjd 12y ago> Is it in a state ready to replace C++? Nope. That will take many years. But it definitely is in a state where you can start building real things with it, if you don't mind some of the usual costs of being on the bleeding edge, like documentation that's hard to grok, frequent trips to irc, and frequent breaking changes. But breaking changes will be going away very soon, the documentation gets better all the time, and the irc room is far friendlier than others.
- amelius 12y agoHow well does the optimizer perform? And do you often encounter nasty, hard to trace, bugs in the compiler output?
- carllerche 12y agoRust uses LLVM for all code generation and optimization. So, in that respect, it is very mature and I personally have never hit an issue.
- deleted 12y ago[deleted]
- sanderjd 12y agoI've yet to see a bug that I traced back to the compiler rather than my own code (which doesn't mean they haven't happened, just that if they have, they have been obscure enough that I haven't noticed them).