Slashdot Mirror


Rust 1.6 Released (rust-lang.org)

An anonymous reader writes: The Rust team has announced the release of version 1.6 of their programming language. The biggest new feature is that libcore — the Rust core library — is now stable. "Rust's standard library is two-tiered: there's a small core library, libcore, and the full standard library, libstd, that builds on top of it. libcore is completely platform agnostic, and requires only a handful of external symbols to be defined. Rust's libstd builds on top of libcore, adding support for memory allocation, I/O, and concurrency. Applications using Rust in the embedded space, as well as those writing operating systems, often eschew libstd, using only libcore." Other features worth noting: Crates.io disallows wildcards for dependencies, there are a ton of stabilized APIs, timer functions that use milliseconds have been deprecated, and the parser will warn you if a failure was caused by Unicode characters that look similar but are interpreted differently.

9 of 75 comments (clear)

  1. New version by Anonymous Coward · · Score: 3, Funny

    They have to introduce a new version every now and then because they run out of people to recommend Rust to. A new version allows them to recommend it to themselves in times of scarcity.

  2. 12 months from now... by 110010001000 · · Score: 4, Funny

    The Rust team has announced a new language, called Frick. This new language will build upon the lessons learned from Rust and provide the ability for developers to leverage security, the Cloud, and the IoT. Your knowledge of Rust is now obsolete and support for Rust has been dropped.

  3. WTF? by sunderland56 · · Score: 4, Insightful

    Since when is stability a feature? Isn't stability a basic requirement for software, especially in a programming language?

    If it takes up to release 1.6 for things to become stable, I'm probably not interested.

    1. Re:WTF? by Anonymous Coward · · Score: 2, Insightful

      If it takes up to release 1.6 for things to become stable...

      Libstd has been stable. This is equivalent to "libc" that C/C++ programmers are familiar with. This new "stability" is libcore, a minimal core library needed to compile. The GCC equivalent of this is the "low-level runtime library" (libgcc.a + libgcc_s.so.1).

      This is important because many popular Rust projects targeting embedded hardware and operating systems have appeared. For these applications libstd is not desirable, and to date they've been relying on an unstable core. Now they have a stable libcore to rely on.

      These changes just reflect the demands of Rust users as they pursue their interests. Thankfully Mozilla values these users and is supporting them. The platform is only a little over 8 months old.... reasonable expectations are necessary.

    2. Re: WTF? by Jezral · · Score: 3, Informative

      Depends on what you mean by fail, but nothing new ever really beats C++. Sure fancy new languages keep popping up with features, but it either lacks portability or performance or control or higher level constructs or reliability or something else that C++ can provide. And eventually C++ gains the language feature anyway, but without sacrificing efficiency for it. Many languages have tried to take C++'s place, but so far none have gotten close. And even where other languages have a good hold (Java, C#, ObjC, etc), when you want an efficient library shared between those ecosystems, you'll write that in C++.

      And no, C doesn't really count in the comparison, because it doesn't grow - while WG14 publishes new standards, it's still mostly C89 used in the wild, with a few extensions.

    3. Re: WTF? by NotInHere · · Score: 2, Informative

      And eventually C++ gains the language feature anyway, but without sacrificing efficiency for it.

      Yes, C++ is a great language if its about which language contains the most features. But one thing which is very bad about c++ is that its very easy to write a bad program. In rust its very hard to write a bad program, as you first have to convince the compiler (including the borrow checker) to compile it, which requires you to think about what works how. Also, rust forbids things it considers "unsafe" by default, while with C++ you still can do very unsafe things.

      C++ is great because its backwards compatible to C. You press a button and a C project is now a C++ project. So many people familiar with C could also try C++. However, as rust doesn't have to provide backwards compat, it can do many things more nice than C did. For example, you don't need to do the #if 0 trick anymore if you want to comment a block of code. So this for example would compile "code" in C++ but wouldn't compile anything in rust: /**/ comments: /* /*comment explaining code*/ code */

      The second thing that rust can add which C++ can never achieve is the improved safety. C++ can't add additional requirements to C, including security. It can't prevent usage of non-smart pointers. And if you want to move a project from using normal pointers to smart pointers, you have to rewrite it anyway.

      There are more things rust is better in than C++:

      * most C++ projects have to deal with numbers sooner or later. But even if everybody praises c++ as portable and so on, its still a common pitfall for projects to assume that char (which is an integer number containing one byte) is 8 bits. And different platforms can have different widths for the other types too, the bounds were specified too broadly by the previous standards, and now nobody wants to touch it anymore. And yes, there is uint16_t etc introduced by c++11, but they are long, and hard to type. I prefer to edit my code without having to use an IDE.

      * Rust's type system is an actual type system. You can return tuples and do more stuff. Everything that's verified compile time comes at run-time for free. So where you need to add an assert in C++, you can simply code a type which does the same thing in rust, without much boilerplate you would have needed in c++.

      * If you pass a mutable reference to an object to a function, you have to prepend &mut to the object's name when calling the function. This hasn't been required by the C++ developers when they introduced references, their first failed attempt to replace pointers.

      * Rust is less portable than C++, that's true, it doesn't run on all hardware platforms C++ runs on, but it runs on the most relevant ones.

      And no, C doesn't really count in the comparison, because it doesn't grow - while WG14 publishes new standards, it's still mostly C89 used in the wild, with a few extensions.

      C is a finished language, you can't really add anything significant to it unless you want to sacrifice its core properties.

  4. Beware of Rust. by Anonymous Coward · · Score: 5, Interesting

    The Rust home page makes it sound like Rust is some sort of a panacea. It leads one to believe that they'll get the power of C++, but with greater "safety".

    But the more I look into Rust, the more uneasy I start to feel.

    Despite all of the claims about how Rust is safer and leads to better code, the Rust compiler and standard library, both of which are implemented in Rust, are full of bugs! Don't forget that this is Rust code written by people who ought to know Rust better than anyone else; they designed the language after all! If they can't write non-buggy Rust code, then we shouldn't expect less-talented Rust users to be able to do any better.

    It's also a big problem that there's only one implementation. If you run into a bug with it, and they don't fix it promptly, then you're likely fucked. At least with C++ there are multiple high quality implementations from different vendors. You can use GCC and Clang on most platforms. Then there are other systems like Intel C++, MSVC++, and so forth. You aren't left at the mercy of a single implementation when you use C++.

    The syntax of Rust is unremarkable. It's like a bad version of C++ in many ways. Its resource management approach is also inflexible and impractical, despite the claims that it's one of Rust's most significant benefits. You're typically better off using modern C++ techniques. You'll get just about the same amount of safety, but with much fewer headaches. Even C++'s standard library, which is not known for being very good, is often better than Rust's.

    It took them forever to get Rust 1.0 released. They were constantly changing their mind about anything and everything. While some evolution of a programming language is to be expected, all we saw from them was spastic thrashing about. It got so bad that you couldn't write code on a Monday and reliably have it compile by the following Friday! The fact that it took libcore up until release 1.6 to "stabilize" just goes to show how bad things were. The supposed "stable" release was full of non-stable interfaces!

    The Rust community gives me a particularly bad feeling. They're rather tyrannical about enforcing their code of conduct. They even have a moderation attack squad to go after anyone they deem to be an enemy! I've never seen this kind of orchestrated control exerted over the community of any other programming language. This sets off warning alarms for me.

    There's no reason to use Rust, in my opinion. You're better off with C++, or D, or Java, or Scala, or C#, or Go, or Swift, or one of the many other non-Rust languages out there. The language isn't very good, the standard libraries aren't very good, there's only one implementation, and the attitude of the community is downright frightening. I think you're better off not using Rust.

  5. Isn't there a quote/corollary about reinventing C? by UnknownSoldier · · Score: 4, Insightful

    We need to update Murphy's Laws for the new millennium:

    * "Those that don't understand C are condemned to re-invent it, poorly."

    Almost applies to every C derivative: C++, Rust, Obj-C, etc. /me ducks :-)

    With apologies to Henry Spencer's "Those who do not understand Unix are condemned to reinvent it, poorly."

  6. Re:Nearly all of Rust's contributors are white mal by 110010001000 · · Score: 2

    Because women aren't stupid enough to work for a corporate controlled language for free.