Rust 1.0 Enters Beta
An anonymous reader writes: Rust is a systems programming language focused on safety and speed and aims, among other things, to offer memory safety without garbage collection and threads without data races. Over on the Rust blog, the Rust Core Team has announced the release of Rust 1.0 beta. They write, 'The beta release marks a very significant "state transition" in the move towards 1.0. In particular, with the beta release, all libraries and language features that are planned to be stable for 1.0 have been marked as stable. As such, the beta release represents an accurate preview of what Rust 1.0 will include.' The final Rust 1.0 release is scheduled for May 15th, 2015. A warning from the developers: "Rust is a work-in-progress and may do anything it likes up to and including eating your laundry." The FAQ is worth reading.
When Rust becomes a little more polished it will likely become very interesting.
soylentnews.org
Now is a good time to play around with Rust and explore the language features! If you build against the beta release and don't add external package dependencies, your code will most likely continue to function for the duration of the 1.0 release cycle. However, now is probably a particularly ~bad time for new rust users to start a project and add a bunch of dependencies from Cargo/crates.io. Beta changed code dependencies on unstable features from warnings to errors, so a lot of common libraries in the ecosystem are broken at the moment, and will take a little while to get updated. Happy hacking!
Is there any reason why anyone would want to use Rust when they're already proficient in both C++ and Ada?
You'd think that Ada is already covering most if not everything what Rust is trying to cover here, especially the memory safety and concurrency aspects.
Site & blog: http://www.mayaposch.com
Is this Rust thing another web framework? Should I assert 5 years experience with Rust on my CV?
Everything is written in JavaScript or soon will be. New language development is a waste of time that should be better spent making mobile apps for 3D printers.
You must be a Java programmer. Garbage collection is generally a very bad idea for a systems language, because of the periodic stalls whilst it does the cleanup. Especially if it's shunting blocks around memory to defragment. It's one of the big reasons why Android underperforms iOS, why it's never been so smooth in operation. And the only thing a developer can do about it is switch to a different language or develop for a more powerful machine.
Memory fragmentation can be a problem - but the success of C and C++ in most domains over the decades has shown it's just one more aspect a programmer has to deal with, it's not a showstopper. It's fixable, on the same machine, with the same language.
Have you actually tried using Rust? I have, and I can tell you that it isn't "polished".
Maybe it won't change as goddamn much as it typically has each day, but it's not a clean language like say Python or C# are.
Its library API is something awful. You have to write stuff like:
The memory management approach is also, to put it nicely, a royal pain in the ass to use. Maybe it can guarantee a higher level of safety, but it slows down development to a crawl, even once you understand how it all works and can work with the compiler instead of against it.
Its string handling is fucked up beyond belief. Go read about about String and &str if you don't believe me.
Rust is a very tedious and anal language to use, to the point of any safety gains being eliminated by much slower development time.
I feel that I can get almost the same level of safety by using modern C++ techniques like RAII and smart pointers, along with strict compiler options, without the speed of development slowing to a crawl.
Rust will be "polished" the day that we can use it swiftly and effectively, rather than being burdened by its awkward memory management, or its shit-for-brains library API, or it's convoluted string handling. I mean, these are some pretty basic things that it's screwing up. If it can't get those even remotely right, it's not "polished".
"It's one of the big reasons why Android underperforms iOS, why it's never been so smooth in operation."
no, there is only one reason: shitty coding.
Looking for people to chat about multicopters, coding, music. skype: gtsiros
rust finally going into beta but then some naked smashed my head in with a rock and stole my bow.
Ah yes, the "systems language" debate. Oh how I love those.
Here are a few things to ponder.
The first is that your claim about Android underperforming iOS doesn't seem to have any merit. I have a Lollipop device here and it's as smooth as any iPhone I've ever used. Indeed I suspect by "smooth" you mean whether animations consistently hit 60fps and that has relatively little to do with garbage collection because most animations only last for a second or two, and you can easily delay GC until after it's finished. If you actually read about Project Butter and the work the Android team did to make things fast and smooth, it mostly involved deep changes to the graphics stack. The new GC in ART helps when doing things like scrolling down infinite lists, but otherwise, it's not a big deal. Bear in mind GC pauses on a modern Android device are in the realm of milliseconds - not fast enough to cause a frame skip unless you're really pushing up against the deadlines.
Another thing to consider is that people love to try and define "systems language" to mean whatever language they happen to prefer at the time. For instance the Linux guys have claimed for years that C++ isn't a "systems language" because you can't use it to write a kernel. However, quite a few successful kernels have done just that: for instance parts of the MacOS kernel are written in C++, the osV kernel is mostly C++ and so on. Microsoft even wrote an entire OS with kernel and everything in garbage collected C#. I've come to believe that the term "systems language" is so vague as to be useless for describing programming languages.
Final point. Rust claims to be superior for systems programming because it doesn't need a garbage collector. However, Mozilla is not in the business of writing kernels. They are in the business of writing web browsers. Web browsers absolutely can be garbage collected and due to the need to support Javascript, often are. At a time when Mozilla is dumping resources into designing an entirely new programming language and experimental layout engine that uses it (Servo), the Chrome guys are quietly getting on with migrating Blink (aka WebKit) to garbage collected C++. The project is called Oilpan, look it up. Apparently Google disagrees with Mozilla about the need for a non-GCd "systems language" for the kind of work they're doing.
The main hot newness in Rust is the borrow checker. It is the source of Rusts most notable strengh and also it's most notable weakness, but you won't see it at all if you just look at a code example online, or download an already-working code example. It's also interesting since it's the first language to really target the remaining C/C++ strongholds in a long time, and it does have an interesting mix of good ideas from other languages. As for graphical programming, I would have said that all the clicking (and not version controlling) puts an upper limit on program complexity, but who knows... people have designed some darn complex stuff in Minecraft; if someone designed a visual programming language for people with that temperament maybe they ~could write something like an operating system by clicking and dragging (and shoveling?).
Things could get very interesting indeed if Apple opens up Swift. I'm not sure if Swift can cover all of the use cases that Rust does, but it can probably cover most of them, and Apple has worked very hard on Swift's ergonomics. Interactive REPL-style coding is a mere twinkle in some rust dev's eye right now; the closest we have is the playpen and the playbot in the IRC channel. The world wins if either of them catch on.
Your final point about Servo and Oilpan is off. Servo has garbage collection in the same way that Chrome is growing garbage collection via Oilpan: for keeping track of objects in the DOM (in fact, Servo uses the SpiderMonkey GC for this, it's actually pretty neat. See https://blog.mozilla.org/resea... for details). Mozilla isn't afraid of garbage collection, they just happen to think that if you can get by without it then hey, why not?