Slashdot Mirror


Rust 1.0 Released

TopSpin writes: Rust 1.0 has arrived, and release parties in Paris, LA and San Francisco are taking place today. From the Rust Programming Language blog: "The current Rust language is the result of a lot of iteration and experimentation. The process has worked out well for us: Rust today is both simpler and more powerful than we originally thought would be possible. But all that experimentation also made it difficult to maintain projects written in Rust, since the language and standard library were constantly changing. The 1.0 release marks the end of that churn. This release is the official beginning of our commitment to stability, and as such it offers a firm foundation for building applications and libraries. From this point forward, breaking changes are largely out of scope (some minor caveats apply, such as compiler bugs)." You can read about specific changes in the changelog.

24 of 149 comments (clear)

  1. Re:Running out of words? by Anonymous Coward · · Score: 5, Insightful

    I'm waiting for the job postings on Dice that have a requirement of at least 5 years of Rust programming experience in the next couple of months.

    Then having those same companies bitch about how they can't find any qualified people and they need more H1-bs.

  2. Any reasons for checking it out? by Anonymous Coward · · Score: 2, Interesting

    So why should I use Rust instead of the languages I'm currently using (Ada and Racket)?

    1. Re:Any reasons for checking it out? by uncqual · · Score: 2

      Because it's shiny? Oh, wait, that can't be it.

      --
      Why is there an "insightful" mod and why isn't it "-1"? If I wanted insight, I wouldn't be reading /.
    2. Re:Any reasons for checking it out? by fluffernutter · · Score: 2

      But I'm a fat programmer! Can I still wear skinny jeans?

      --
      Laws are rules for the court, but merely a bottom bar to hit for life. Think beyond laws in your actions always.
  3. Re:Running out of words? by sycodon · · Score: 4, Funny

    Has there ever been a new language that wasn't described as "both simpler and more powerful".

    --
    When Fascism comes to America, it will call itself Anti-Fascism, and tell you to give up your guns.
  4. Re:Running out of words? by sycodon · · Score: 4, Insightful

    And THEN some recruiter saying he has people in Bangalore that do have 5 years experience in Rust.

    --
    When Fascism comes to America, it will call itself Anti-Fascism, and tell you to give up your guns.
  5. I thought Rust the game by kassay · · Score: 2

    From the headline, I thought it was Rust the game.... Then I thought, typical of /. to be way behind on a story as Rust the game hit 1.0 a while ago. If you haven't played Rust (the game) it is way more fun then Rust the language.

    1. Re:I thought Rust the game by Zero__Kelvin · · Score: 2

      It's also more fun then English!

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
  6. Re:Running out of words? by Anonymous Coward · · Score: 2, Informative

    BF.

  7. I am working on Shiny 0.9.0 right now by HannethCom · · Score: 4, Funny

    Rust is old and creaky. Now introducing Shiny! It is the programming language that gets rid of all cruft of Rust and adds a layer of NICKEL (Non-Intrusive Code Keying for Easy Learning) to make your programs shine forever. It is a high level language that anyone can learn to code in, but brings almost assembly level of performance.

    Get Started Coding Today!
    https://www.youtube.com/watch?...

    --
    Microsoft, Apple, Google, Amazon what's the difference? All steal money from devs and control with walled gardens.
  8. Being rusty is no excuse... by __aaclcg7560 · · Score: 3, Insightful

    Job postings for Rust on Dice will require five years of experience for a programming language that came out six months ago.

  9. Rust made a mistake in going C++-syntax by euroq · · Score: 3, Interesting

    They could have made the same simple concepts without going C++ style. This is obviously just aesthetics, but I don't think the language looks nice compared to lots of newer languages (Swift, Ruby, Kotlin, and even D).

    The :: scope operator is ugly and redundant.

    This match syntax is just ugly and hard to type:

        match header[0] {
                    1 => Ok(Version::Version1),
                    2 => Ok(Version::Version2),
                    _ => Err(ParseError::InvalidVersion)
            }

    The following is ugly and is not obvious:

    use std::sync::{Arc, Mutex};
    use std::thread;
    use std::sync::mpsc;

    fn main() {
            let data = Arc::new(Mutex::new(0u32));

            let (tx, rx) = mpsc::channel();

            for _ in 0..10 {
                    let (data, tx) = (data.clone(), tx.clone());

                    thread::spawn(move || {
                            let mut data = data.lock().unwrap();
                            *data += 1;

                            tx.send(());
                    });
            }

            for _ in 0..10 {
                    rx.recv();
            }
    }

    A simple printf function has to be a macro, because the techniques it uses are unsafe which is a main feature of the language.

    OK a lot of these gripes are trivial; I guess I'm getting at the fact that they went an academic route about how to deal with pointers and memory allocation safely, and then built everything around that. It was so academic and engineering-like and they didn't think or try very hard about the design and aesthetics.

    --
    Just because the U.S. is a republic does not mean it is not a democracy. Democracy/republic are not mutually exclusive.
    1. Re: Rust made a mistake in going C++-syntax by Frequency+Domain · · Score: 2

      Nobody writing new C++ code writes it like it was written decades ago.

      Nobody? We vintage programmers can not only make our C++ look like it was written decades ago, we can even make it look like FORTRAN!

      You kids goto off my lawn!

    2. Re: Rust made a mistake in going C++-syntax by roca · · Score: 3, Insightful

      C++ provides no safety guarantees: there's no subset of C++ that can be statically checked to be safe, that's rich enough for C++ programmers to use in practice. As soon as you use pointers or references you have the possibility of the underlying object dying and leaving a dangling reference.

    3. Re:Rust made a mistake in going C++-syntax by tgv · · Score: 2

      > A simple printf function has to be a macro

      I don't see anything wrong with that. Actually, it sounds quite sensible: it gets rid of some ugly variable arguments handling code, but still keeps the source readable. For the rest: Rust is an interesting idea, but doesn't look ideal. Apparently, it does not interface well with C++, only C, but mixing with C++ could be a good start. Rewrite some buggy code in Rust where it makes sense while keeping the rest in C++.

  10. Re:I'm worried by what I see. by Lunix+Nutcase · · Score: 3, Insightful

    What's the relevance of this exactly? I'm not sure how Microsoft having bugs in their software somehow cancels out the ton of bugs in the Rust compiler, it's standard library and the software project that is its biggest consumer. Does the Rust bugs somehow cease to exist because bugs exist in Microsoft software? Do their severity somehow change because Microsoft has bugs in its software? Come back when you have an actual argument not "BUT MICRO$OFT!!!"

  11. WTF by Etcetera · · Score: 2, Insightful

    How to tell if you're out hipster-ing your trendy, Brogrammer self:

    Your next-big-thing programming language is having simultaneous release parties Paris, LA and San Francisco.

  12. Re:Make better language, not better coders. by Thiez · · Score: 3, Insightful

    You can do whatever you want with pointers (although the things that are UB in C will tend to be UB in Rust also), you just need to do so in an unsafe{ .. } block. The improvement over C/C++ is that you won't trigger UB by accident while using the safe subset of the language, and the vast majority of the time you will be able to do what you want in that subset.

  13. Re:Commitment to stability by Thiez · · Score: 4, Informative

    > What will the performance penalties be to optimized C or C++ code? Some of the guarantees that the Rust type-system provides could theoretically allow better optimization than C/C++. For instance, when you have an immutable reference (&something)to a object of a type that does not have internal mutability (that means the vast majority), that object is guaranteed to be immutable for as long as your reference is alive (note that this guarantee is stronger than that offered by a const *). And when you have a mutable reference (&mut something) your pointer is guaranteed not to alias, so once again your object is immutable except for the changes that you choose to make. You could say that all &mut T references are T *restrict. In addition, references in Rust are guaranteed to be non-null. All this extra information offers opportunities for optimization. Note that (AFAIK) not all this information is being communicated to the LLVM back-end at this time. In short, I do not expect performance penalties.

  14. Re:I'm worried by what I see. by Thiez · · Score: 4, Insightful

    The issue tracker in Rust is used not only for bugs in the compiler, but also for tracking the standard library, new features, enhancements, some infrastructure, documentation, lints, etc. Assuming that 1900 open issues means there are 1900 bugs is ridiculous. If you look at the labels used on the issues tracker, you'll find that the label I-crash has 19 open issues. Of course not all bugs will be labelled correctly, so no doubt there will be more defects, but hardly the number that the 'worried' anon suggests. Also note that the language has changed significantly over the years, until it reached the current design. To look at some of the older bugs and conclude that the current version of the language can't be very good is silly because the rust of two or three years ago might as well have been a completely different language. As for servo, looking again at the label I-crash, I see (at this time) 39 open issues, which sounds much more reasonable than 800.

  15. Re:I'm worried by what I see. by Thiez · · Score: 2

    I ignored the AC because, well, AC. But you repeated the claim of 'a ton of bugs', so replying to you seemed worth it at the time.

  16. Re: Running out of words? by Anonymous Coward · · Score: 2, Funny

    Bjarne, is that you?

  17. Re:Commitment to stability by roca · · Score: 2

    Your last sentence sums it up nicely. If you stick to the safe subset of Rust (which is almost the entire language, and enough to write almost all of a high-performance Web browser in, for example) then you can't trigger undefined behaviors, and references that claim to be non-null are guaranteed to really not be null. Escaping from that subset requires you to write the "unsafe" keyword.

    OTOH C++ has nothing like that. It's very very easy in practice for C++ code to accidentally trigger undefined behaviors that can cause anything to happen, and there's no way to tell at compile time whether the code is safe.

  18. Re:Commitment to stability by roca · · Score: 2

    You can build Rust programs and libraries that don't link to the standard library (as you can in C) This is very useful. Rust is pretty much the only language that lets you write complex safe code and still not link to any standard library (since its memory-safe competitors all require GC).