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.

149 comments

  1. Running out of words? by AndyKron · · Score: 0

    Running out of words to call those next big things?

    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. 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.
    3. Re:Running out of words? by Lunix+Nutcase · · Score: 1

      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.

      Not bad for the people who have been working on Rust internally at Mozilla since 2009. They're about to hit 6 years of experience!

    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. Re:Running out of words? by Anonymous Coward · · Score: 2, Informative

      BF.

    6. Re:Running out of words? by Anonymous Coward · · Score: 0

      I once created a new language but it failed to gain traction. I promoted it, very honestly, as "both more complicated and less powerful than available alternatives". I still don't understand why it didn't take off in the marketplace.

    7. Re:Running out of words? by Anonymous Coward · · Score: 0

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

      But this is more power than even they expected. Sounds like a monster out of control to me.

    8. Re:Running out of words? by jellomizer · · Score: 1

      Usually Simpler or More Powerful.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    9. Re:Running out of words? by jopsen · · Score: 1

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

      I'm not sure it's simpler... But the type system offers some really interesting ownership models.
      One can than argue that it being harder to shoot yourself in the foot makes it simpler :)

    10. Re: Running out of words? by Anonymous Coward · · Score: 0

      asians laugh about stupidly honest whiteys

    11. Re:Running out of words? by Lunix+Nutcase · · Score: 1

      One can than argue that it being harder to shoot yourself in the foot makes it simpler :)

      Not really. Take guns for example. It's quite simple to blast one's foot off with any gun. It's actually quite a bit more complex to be able to make a gun such that shooting one's foot off is hard.

    12. Re:Running out of words? by __aaclcg7560 · · Score: 1

      If the recruiters looked over to Russia, they will find programmers who dealt with rust since the fall of the Berlin Wall. The whole country has been falling apart since then.

    13. Re:Running out of words? by Anonymous Coward · · Score: 0

      Haskell, Ada, Erlang, etc.

    14. Re:Running out of words? by ArcadeMan · · Score: 1

      Introducing Binary , a language so simple that the whole manual is a single line: 0 means off, 1 means on

      Share and Enjoy!

    15. Re:Running out of words? by Anonymous Coward · · Score: 0

      That doesn't count - it wasn't on version 1.1

    16. Re:Running out of words? by Lunix+Nutcase · · Score: 1

      Touche!

      Senior Software Engineer: Minimum 5 years of experience in Rust 2.0!

    17. Re:Running out of words? by Anonymous Coward · · Score: 0

      Not sure bout powerful but if you hire some c++ guys I am sure they can make it simpler than anything else there is.

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

      Bjarne, is that you?

    19. Re:Running out of words? by Anonymous Coward · · Score: 0

      Well see that's part of the H1-T visa program that allows time travelers to get jobs in the past, because all the jobs in the future are taken by H1-T workers from their future.

    20. Re:Running out of words? by Darinbob · · Score: 1

      Yah, but would they really want a low paying entry level Rust job that requires 5 years Rust experience and a Rust Certificate?

    21. Re:Running out of words? by Darinbob · · Score: 1

      It's easy to make a gun that won't shoot your own foot off. Of course, it won't be able to shoot anything else either.

    22. Re:Running out of words? by Darinbob · · Score: 1

      Woah, I was doing this code review and I think I saw a 2.

    23. Re:Running out of words? by Anonymous Coward · · Score: 0

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

      I know you're joking, but yes.
      Malbolge was specifically designed to be nearly impossible to program in.
      INTERCAL (jokingly) tried to be different from any other programming language, and as a result made simple, common operations complex, cryptic with redundant syntax.

    24. Re:Running out of words? by BasilBrush · · Score: 1

      A 7 foot long rifle would be able to shoot lots of things other than your own foot. But you'd probably need to make the shot prone, sniper style.

    25. Re: Running out of words? by Billly+Gates · · Score: 1
    26. Re:Running out of words? by jopsen · · Score: 1

      But the gun that has anti measures to prevent you from shooting your foot off, isn't necessarily more complicated to operate.
      One can argue it's simpler because you have fewer body parts to watch out for ...

      In rust sense, one can argue it's simpler to code because there are entire classes of bugs that can be avoided with static typing. So you don't have to worry about that kind of bugs anymore.

      Similarly one can argue that haskell is simple because if it compiles, then it'll very often do the right thing. So you don't have to watch out for bugs, the compiler will... Of course it's very hard to write anything non-trivial that compiles in haskell :)

  2. No one cares. by Anonymous Coward · · Score: 0

    And the 3 users outside of Mozilla must be excited.

    1. Re:No one cares. by Anonymous Coward · · Score: 0

      And the 3 users outside of Mozilla must be excited.

      Apparently they all live in Paris, LA and San Francisco.

    2. Re:No one cares. by bobbied · · Score: 1

      Wow... Three parties of one... Hope they at least have video links between them...

      --
      "File to fit, pound to insert, paint to match" - Aircraft Maintenance 101
    3. Re:No one cares. by Anonymous Coward · · Score: 0

      It's going to be a webtacular event! In cyberspace!

    4. Re:No one cares. by tnk1 · · Score: 1

      I'm curious. Did C or C++ have a release party? Or is that a value added feature of Rust?

    5. Re:No one cares. by gweihir · · Score: 1

      Well, then at least it did bring something to the table besides hype.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    6. Re: No one cares. by Anonymous Coward · · Score: 0

      yeah, they brought CYBER WAR to everybodys table. raytheon is thankful.

    7. Re:No one cares. by slack_justyb · · Score: 1

      We had a C++11 party. It was mostly themed, "About damn time!" Our C++14 party we held up a banner, "Here's to a 10'00'0'00 lines of code that will abuse the new number concept." Our C++17 party will be a mostly confusing and unintelligible cluster fuck of multiple party ideas rolled into one.

      Also, before anyone get's angry, I'm just being funny.

  3. The pants simulator? by Anonymous Coward · · Score: 0

    Apparently not that RUST.

  4. 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 Lunix+Nutcase · · Score: 0, Troll

      You shouldn't unless you want to be a language hipster.

    2. 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 /.
    3. Re:Any reasons for checking it out? by Anonymous Coward · · Score: 1

      Thanks for clarifying. I'm always worried about how my choice of programming language defines me as a person.

    4. Re:Any reasons for checking it out? by Anonymous Coward · · Score: 0

      You'll also need a MacBook Pro, emo glasses and skinny jeans to be a real Rust programmer.

    5. Re:Any reasons for checking it out? by Anonymous Coward · · Score: 0

      You forgot the beard!

    6. Re:Any reasons for checking it out? by Desler · · Score: 1

      Yeah can't forget the chin-strap beard.

    7. Re:Any reasons for checking it out? by __aaclcg7560 · · Score: 1

      Called a soup-catcher. Get with the program.

    8. Re:Any reasons for checking it out? by Desler · · Score: 1

      I apologize. I don't keep up on the latest lingo for douche beards.

    9. Re:Any reasons for checking it out? by __aaclcg7560 · · Score: 1

      You obviously don't know the difference between manly beards and girly beards. :P

    10. 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.
    11. Re:Any reasons for checking it out? by Darinbob · · Score: 1

      Of course you can. It's economical too since all jeans are skinny jeans to a fat hipster. The point of skinny jeans is not to be comfortable but to make the onlooker uncomfortable, and only a fat hipster can pull that off so perfectly.

    12. Re: Any reasons for checking it out? by Anonymous Coward · · Score: 0

      Dwalin, please stop trolling the small folk.

    13. Re:Any reasons for checking it out? by Anonymous Coward · · Score: 0

      Are there no female programmers in the entire world?

  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. Hmmm... by Anonymous Coward · · Score: 0

    Mozilla tries to reinvent a bicycle

    1. Re:Hmmm... by Anonymous Coward · · Score: 0

      With a big wheels that has triangle wheels.

    2. Re:Hmmm... by ArcadeMan · · Score: 1

      According to South Park, Canadian cars feature wheels that are 33% more advanced.

  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.
    1. Re:I am working on Shiny 0.9.0 right now by Darinbob · · Score: 1

      But will it still work with my TETANUS debugger? (Test Environment To Analyze Negative Usage Symptoms)

    2. Re:I am working on Shiny 0.9.0 right now by SwampApe · · Score: 1

      Good that Shiny is actually a thing http://shiny.rstudio.com/ (rstudio.com)

  8. Another day, another Web language by Anonymous Coward · · Score: 0

    Ruby on Rusty Rails?

    1. Re:Another day, another Web language by istartedi · · Score: 1

      If we can get Blackboard, Inc. to adopt it, we could have Rusty Rails on a Blackboard. We'd be just one letter away from perfection.

      --
      For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
  9. Re:I'm worried by what I see. by Anonymous Coward · · Score: 0

    Imagine if MSFT had their Rally defects public...

  10. So much wasted potential. by Anonymous Coward · · Score: 1, Interesting

    Rust would have been useful 5 years ago. But now there is no reason to use it. Go, C++14, Ada 2012, OCaml, D, Scala, and even C# (now that core .NET code has been opened sourced and ported to non-Windows systems) offer everything Rust does, plus more. Somebody will probably claim that Rust "isn't competing with those languages", but in reality it is, and it's way behind them. Rust could have been a game changer, but like Perl 6 its developers just couldn't get a stable major release out on a reasonable schedule. Too many years went by and the alternatives became better options.

    1. Re:So much wasted potential. by Anonymous Coward · · Score: 0, Flamebait

      >Go, C++14, Ada 2012, OCaml, D, Scala, and even C# (now that core .NET code has been opened sourced and ported to non-Windows systems) offer everything Rust does, plus more.

      No, they don't. But you're free to pretend they do, if you'd like. Not everyone NEEDS something like Rust, after all.

    2. Re:So much wasted potential. by Anonymous Coward · · Score: 0

      Completely incorrect. They do not offer all that Rust does. None have an equivalent to Rust's ownership system. Whether you think it's a good feature is irrelevant: other languages don't have it.

      There certainly may be advantages to other languages, but it's ridiculous to say that they offer all that Rust does.

  11. 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.

    1. Re:Being rusty is no excuse... by Lunix+Nutcase · · Score: 1

      Rust has been worked on internally at Mozilla since 2009, was publicly announced in 2010 and had it's earliest pre-release alphas in 2012. It's hardly only been out for 6 months.

    2. Re:Being rusty is no excuse... by __aaclcg7560 · · Score: 1

      That's what they said about Swift.

    3. Re:Being rusty is no excuse... by Lunix+Nutcase · · Score: 1

      Great, for "them". What exactly is the relevance?

    4. Re:Being rusty is no excuse... by Lunix+Nutcase · · Score: 1

      To add, unlike Swift Rust has been publicly being developed on Github since 2010. So it doesn't matter what anyone "says" when there is a Public git record dating back to their 2010 public announcement about the language. Unless you think Github and the Rust developers faked their git history.

    5. Re:Being rusty is no excuse... by __aaclcg7560 · · Score: 1

      Whenever a new technology comes out, recruiters will require five years of experience. The only people who would remotely qualified for five years of experience are the people worked on the new technology. By the time everyone hears about it (I haven't heard of Rust until today), six months will have gone by.

    6. Re:Being rusty is no excuse... by Lunix+Nutcase · · Score: 1

      No, people have been able to use Rust as an alpha-quality language for pet projects for going on 3 years now. Just because you only heard of it today doesn't mean the rest of us did.

    7. Re: Being rusty is no excuse... by Anonymous Coward · · Score: 0

      rust and swift have been initiated by showing relevant folks the sappeur language. sappeur is in the tradition of algol and pascal.

      swiss perfection instead of new england fudging. c++ done correctly. using the type system for correct parallelism.

    8. Re:Being rusty is no excuse... by Anonymous Coward · · Score: 0

      "So you'd like a job. What's your experience?"

      "3 years working on a pet project in an alpha-quality language."

      "..."

  12. 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 Anonymous Coward · · Score: 0, Interesting

      The syntax just reflects that the underlying concepts are flawed. Their ownership model is just one big ugly hack, for example. It's hard to work with, even when you do understand how it works. C++ can give you pretty much the same determinism and safety, but it's much nicer to work with.

    2. Re:Rust made a mistake in going C++-syntax by __aaclcg7560 · · Score: 0
      Looking at the documentation.

      $ rustc --version

      This clearly looks like a rusted version of the C programming language. Move along, nothing to see.

    3. Re: Rust made a mistake in going C++-syntax by Anonymous Coward · · Score: 0

      except for real world c++ programs you say truth.

    4. Re: Rust made a mistake in going C++-syntax by Anonymous Coward · · Score: 0

      You're thinking of C++ code from the 1980s and 1990s. That code is over 2 decades old. It's older than some of the Rust contributors are, even! Modern C++ is a very different language, even if ancient C++ code is still accepted by modern C++ compilers. Nobody writing new C++ code writes it like it was written decades ago.

    5. Re:Rust made a mistake in going C++-syntax by Anonymous Coward · · Score: 0

      I agree.
      I read some of the papers that Rust is based on, and there are certainly some very interesting (read: I read your paper and while I have nothing negative to say, I also don't have anything positive) ideas. For instance the idea of ownership and mutability, and certainly the trait system both sound like really good ideas.
      And while I think it's time we have a more structured version macros this seems like it's unnecessarily complex.
      And the whole mutability, borrowing boxing, etc just looks like it'll add a whole bunch of syntax clutter.
      None of the examples I saw are complex enough to show how real world application code will look.

      I hope it works out, but for now I'll just wait and see.
      I also don't like the return thing.
      Why not just always have a return? or never, and just make it so that if you leave off the ; it returns.
      It seems like uneeded complexity. Just like how in VDHL you can put optional identifiers for any kind of block, but you don't have to.
      What's the point of those? Just put in a comment if you want.
      For instance ending a loop can be:
      end;
      end loop;
      end loop loop_name;
      Yeah, I dislike optional syntax.

    6. 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!

    7. 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.

    8. Re:Rust made a mistake in going C++-syntax by Etcetera · · Score: 1

      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:

      Honestly, if you're going to throw syntax open to a full re-evaluation, I'd much prefer something like perl6. It may seem convoluted, but at least it's been designed by a linguist and has an internal coherence. It also provides enough of a hint as to what the programmer is intending that a (future) perl6 compiler should be able to optimize the heck out of it.

    9. Re:Rust made a mistake in going C++-syntax by Blaskowicz · · Score: 1

      But on simple examples I like that macros are identified with a bang, like this : println!
      It's daunting that in a language you might encounter some name, but don't know if it's a real function, or a macro, or something that was overloaded.
      As for the :: operator I simply don't know what the fuck it means. dunno if it's ugly or not, but means that I would have to learn what it means, and why it's not just a ".".

    10. 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++.

    11. Re:Rust made a mistake in going C++-syntax by Anonymous Coward · · Score: 0

      The following is ugly and is not obvious:

      I really see nothign that's "not obvious".

      The {} symbols depict a set, which are composed of one or more elements. An expression like use std::sync::{Arc, Mutex} obviously means that Arc and Mutex are included in the same namespace std::sync.

      Declaring functions through the fn keyword is also quite obvious, and a major step up from languages such as C or C++ with its weird clockwise/spiral rule.

      Declaring variables with the let keyword is also quite obvious for the same reasons.

      The loops and iterators are blatantly obvious, perhaps with the single exception of the _ keyword. Nevertheless, other standard programming languages such as Matlab's m-code use the ~ keyword instead for the same effect, and it becomes quite obvious once the user reads a single paragraph on the matter.

      What exactly do you believe it's non-obvious? Is there anything at all that you have a hard time understanding?

      It appears you're desperately trying to bitch about something but instead you're grasping at straws.

    12. Re:Rust made a mistake in going C++-syntax by euroq · · Score: 1

      What I mean with that is that the language was designed with certain safety mechanisms involved. However, in order to do something as simple (maybe simple isn't the right word, but common) as the printf function, you have to break the standard safety mechanisms. Hence the printf function is a macro, and underneath the hood there is a whole lot of ugliness.

      Now, taking a step back further, I think that it's good that ugliness is hidden behind the scenes. My point is that, if one has to get ugly to do the things that need to be done in a printf function, then I expect that it will actually become common and necessary to "do ugly things" in order to get stuff done in real-world applications.

      And maybe I'm wrong, who knows?

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

      I see. Printf is a bit of a weird function: perhaps they need a better macro syntax. Expanding at compile time is safe, so a good language for that might overcome (part of) these problems.

      > it will actually become common and necessary to "do ugly things" in order to get stuff done in real-world applications.

      Quite likely. But if that can be kept to a minimum, possibly shielded behind macros and the likes, and the rest of the code can achieve good performance, then we might have won something.

    14. Re:Rust made a mistake in going C++-syntax by Blaskowicz · · Score: 1

      The _ makes good sense as it's the default/fallback case in pattern matching, meaning "anything else and I don't care about the value". _ is used for that in e.g. Haskell, Ocaml and F#. So it's neat that it's used to get rid of an useless i variable.

  13. 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!!!"

  14. Comment removed by account_deleted · · Score: 0

    Comment removed based on user account deletion

  15. People keep saying X years of experience by Daniel+Hoffmann · · Score: 1

    But when I see years of experience in a job posting it usually is like this:

    X years of experience in backend/functional programming/frontend/relational databases like (java/ruby/C#)/(clojure,erlang,scala)/(javascript,html,css)/(oracle,sql server,mysql). Bonus points if you have experience with Y technology.

    Which is sensible, even though rust might be only a couple of years old when you want a senior dev you want one that has been dealing with these kinds of problems for many years, even if most of those years were not in the right language. So expect a rust ad to say:

    10 years with a low-level programming language (Rust/C/C++/Assembly), bonus points if experienced with Rust.

  16. Commitment to stability by Dutch+Gun · · Score: 1

    So, is that like a Python or D commitment to stability, or a C/C++ level commitment to stability? Exactly how committed are they to preserving to preserving backwards compatibility through hell and high water? Because that's why people trust C/C++ - they know that the language committees are not going to suddenly "fix" the language by making billions of lines of code obsolete, simply because it was written fifteen years ago before a bunch of new shiny features have been added.

    I think widespread adoption is going to remain limited until it becomes clear how Mozilla plans to shepherd and develop this language as well. Will it become standardized? Will mature cross-platform tools become available? What will the performance penalties be to optimized C or C++ code?

    I wish Rust all the best. It's going to be difficult to unseat C/C++ simply due to inertia, as well as convincing programmers of the merits of an entirely new language, but I like the idea of a memory-safe language that doesn't require a runtime or use managed memory.

    --
    Irony: Agile development has too much intertia to be abandoned now.
    1. Re:Commitment to stability by Dutch+Gun · · Score: 1

      I hate to break it to you but Rust has a runtime. No different than pretty much every language. You're not one of those people that doesn't realize that C or C++ also have runtimes, right? You do know what the "crt" in msvcrt means, right?

      I meant to type "runtime interpreter". No need to be so snarky.

      --
      Irony: Agile development has too much intertia to be abandoned now.
    2. 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.

    3. Re:Commitment to stability by Dutch+Gun · · Score: 1

      Since this is compiled code, the predictions I've heard of "it will perform about as well as C++ if you're using it with the same level of protection as Rust gives" makes sense to me. The implication is that yes, it's going to be a bit slower in the general use case, but if you're writing highly threaded or parallel C/C++ code, then you'd have to manually implement that level of protection anyhow in those languages.

      We'll have to see if that actually pans out in practice or not. I remain slightly skeptical of promised performance gains, because we've heard for years about how interpreted languages could match native code with enough work on JIT optimization, but it never really materialized (despite getting much closer).

      I'm in an industry that's dominated by C++, so I certainly don't expect to be using Rust in practice anytime soon, but I'll definitely be keeping an eye on it.

      --
      Irony: Agile development has too much intertia to be abandoned now.
    4. Re:Commitment to stability by Lunix+Nutcase · · Score: 1

      In addition, references in Rust are guaranteed to be non-null.

      As they are in C++. They are also compile-time checked to make sure they have been initialized. It's one of the whole reasons that references exist in C++ and should be used in place of pointers whenever possible.

    5. Re:Commitment to stability by roca · · Score: 1

      int* p = nullptr;
      int& p2 = *p; // Hello, null reference

    6. Re:Commitment to stability by Thiez · · Score: 1

      But C++ does not allow references to references, arrays of references, and pointers to references. Rust has all these things, while still being able to ensure that the references are valid.

    7. Re:Commitment to stability by serviscope_minor · · Score: 1

      As they are in C++.

      No they ain't. Null references are UB, not impossible.

      --
      SJW n. One who posts facts.
    8. Re:Commitment to stability by Thiez · · Score: 1

      Not that hard in Rust either:

      let badref: &u32 = unsafe { std::mem::transmute(0 as *const u32)};

      But doing this trick is UB in both C++ and Rust, so it's not really fair to hold it against either language. Having said that, one advantage of Rust would be that it is impossible to create such a bad reference without using an unsafe block, while in C++ it seems much easier to do so by mistake.

    9. Re:Commitment to stability by smaddox · · Score: 1

      C and C++ have evolved a ton over the years, and vendor-specific extensions are common (though less so now than in the beginning).

      Rust doesn't need to unseat C/C++, nor should that be its goal (and I don't think it is). It is simply a tool that you can choose to use or choose not to use. Once the remaining bugs are fleshed out, there's a good chance it will be valuable for projects requiring exceptional security.

      Note that it also interoperates fairly easily with C/C++, so you can implement some parts of a project in C/C++ and other parts in Rust.

    10. Re:Commitment to stability by mandolin · · Score: 1

      Not disagreeing with you, but a nullptr-to-reference cast would at least crash immediately (unless you have a compiler that takes "undefined behavior" too literally). Here's another contrived example:

      const char *c = std::string("oops").c_str();

      I'm not a c++ expert but I'm pretty sure 'c' now points to freed memory. The real problem is that the code will usually work until a customer runs it. And solutions like valgrind aren't always optimal (consider code coverage and execution speed) or even necessarily available, depending on your platform.

      Rust eliminates this class of errors (and several others) entirely, unless you are abusing 'unsafe' (which you can at least grep for in your code) as you mentioned.

      I would like Rust to succeed. In several ways, it is basically a 'better' C++ without the C baggage that a lot of people seem to want, and it is clear that Rust's developers have put a lot of thought into it. Still, the language has its warts and oddities. My biggest concern is that support for implementing intrusive data structures (you can Google that, but the Linux kernel's double-linked lists is an example) seemed to be possible, but not Easy, and I think it should be. I also haven't wrapped my head around Rust's lifetimes yet, but it looks clunky. Other things (slow compiler, incomplete library support) should get better with time.

      I wish the Rust guys the best of luck, and look forward to using it.

    11. 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.

    12. 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).

    13. Re:Commitment to stability by Anonymous Coward · · Score: 0

      In theory, Rust is a more expressive language -- it's easier to explain your intention using keywords and syntax in the language, rather than building on top of the language. For example, Rust understands ownership, return values that must be examined, structuring and destructuring of data, AST extensions that can directly convert custom code into the best AST representation (rather than just one that works), and so on. Features like these allow the compiler to understand more of what you're doing. As a result, it can optimise more too. In theory, at least. In reality, C++ has been around a lot longer, and has a lot of time+money invested in its performance. So, for now, C++ will probably win, but Rust will hold its own, and will probably eventually overtake C++.

  17. Re:I'm worried by what I see. by Lunix+Nutcase · · Score: 1

    My post was flamebait? In what way exactly? Or did someone just get butthurt that I didn't go "Yeah, you're right. Hurr hurr micro$oft sucks!! Hurr hurr!"

  18. Re:Make better language, not better coders. by Anonymous Coward · · Score: 0

    They're already beginning to at least replace some components in Firefox with Rust ones, and they have another entire browser they're slowly writing in Rust (although some components are still in C++).

    I think at this point, you either stick with what you know, go for the new language that you feel has the most momentum in your field/market, or pick the one that you feel will help you the most and try to see if it will. Waiting for adoption is just an excuse to not be an adopter yourself. If Rust interests you, be an adopter if you can. It's not like it has the support of a Google or Apple behind it, making it a big part of their ecosytems as quickly as possible. It needs interested parties to do their part, too.

  19. Social coding at its finest? by Anonymous Coward · · Score: 0

    When you have a release party and no reference implementation (i.e. hardware HAL to UI).... language isn't going to gain much attention in a few months.

    1. Re:Social coding at its finest? by smaddox · · Score: 1

      It has a command line UI. If you mean GUI, I'm not sure why you would need a reference implementation of a GUI for a programming language.

    2. Re:Social coding at its finest? by Anonymous Coward · · Score: 0

      For the same reason you'd need Visual Basic to write GUIs to track IP addresses. Duh.

  20. 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.

    1. Re: WTF by Anonymous Coward · · Score: 0

      I hope Mozilla isn't funding these. They should put that money toward fixing Firefox's bugs. Firefox, unlike Rust, is the only product of theirs that even has users.

    2. Re: WTF by Anonymous Coward · · Score: 0

      daimler and benz should have focused on building better horse carriages. jay !

  21. Re: I'm worried by what I see. by Anonymous Coward · · Score: 0

    Whenever Rust comes up for discussion at HN, and somebody points out a problem with Rust, or even just doesn't write something blindingly positive enough about Rust, that person is almost guaranteed to be mobbed by downvoters. The same appears to be happening here. Maybe this should not be surprising, though? Most people who like Rust are Millennials. Millennials are notoriously thin-skinned, can't stand legitimate criticism, and love to censor people. We're probably just seeing them act as the petty little tyrants that Millennials like them tend to be.

  22. Re:I'm worried by what I see. by Anonymous Coward · · Score: 0

    Imagine if you had an actual argument...

  23. 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.

  24. Re:Make better language, not better coders. by Lunix+Nutcase · · Score: 1

    Waiting for adoption is just an excuse to not be an adopter yourself.

    No, it's waiting for Mozilla to actually prove the language is viable.

  25. Re:Make better language, not better coders. by gweihir · · Score: 1

    Same here. And really, most pointer vulnerabilities go away when you code carefully, and finding the rest with things like Valgrind works well if you actually have thought about testing when you designed your code. And in really critical places, you can always do check-before-use and fail gracefully instead of insecure. Of course, all these things require that you know what you do. Things like Rust are an insult to those of us that do.

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  26. Re:Make better language, not better coders. by Lunix+Nutcase · · Score: 1, Insightful

    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.

    I can do the same thing in C++ using a safe subset of it as well without needing to learn a new language and waste man years porting software. No one doing modern C++ should be dealing with raw pointers outside of exceptional cases.

  27. Re:Make better language, not better coders. by Lunix+Nutcase · · Score: 1

    Plus, they have yet to even prove the fact that Rust is good at what they claim it's made for. C and C++ didn't win over programmers through hype. They won over programmers by being proven through real-world applications. It's easy to talk up a language, it's much harder to back that talk up with real-world results.

  28. Interesting, but... by HiThere · · Score: 1

    It looks interesting, but they need to work on their documentation. I wasn't able to find anything about reading and writing random access files. It had many things that appear easy to do in Rust which are difficult in various different languages, but I couldn't find a way in which it was notably better overall in any area.

    FWIW I was mainly comparing it against D and Python, with a few considerations of Ruby. I should have compared it against Ada, but it's been too long since I actually used it. I can't reasonably compare it against C++ as I haven't used it significantly since the STL was adopted. (At that point I was stuck using access basic, and relatively to that nearly *anything* looks good.) The only fortran I could compare it against is FORTRAN IV, and they are nearly disjoint in the tasks that they would be good at.

    Mind you, this comparison is based purely on reading over the documentation, and shouldn't be taken too seriously. So often the contents of the package doesn't match what it says on the packaging. Given what it says on the packaging my favorite language would be Vala, but actually I never use it.

    --

    I think we've pushed this "anyone can grow up to be president" thing too far.
  29. Re:Make better language, not better coders. by Actually,+I+do+RTFA · · Score: 1

    The more the compiler can protect me from past-me, the better. And certainly from my coworkers.

    Look, I don't get how Rust deals with circular references at all (screw you, leak, I think). But the way to train better coders is to get them up on standards. Why you wouldn't want those standards enforced by the compiler I have no idea.

    I read the Rust documentation (what 1/2 or 1/4 or something of it there was). Okay ideas, but not terribly interesting. But if I could snap my fingers and code that didn't meet the coding standard I used wouldn't compile. That would be amazing.

    --
    Your ad here. Ask me how!
  30. 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.

  31. Re: I'm worried by what I see. by Anonymous Coward · · Score: 0

    while baby boomers created the cyber war domain and did one major FALSE FLAG WAR, just like hitler did.

    does it hurt already or do you need more ?

    rust and swift are attempts at closing down the horribly insecure and dangerous world of BELL LABS CYBER WAR DOMAIN.

  32. Re:I'm worried by what I see. by Lunix+Nutcase · · Score: 1

    You must be responding to the wrong person. My response was to the ridiculous "But Microsoft!!" post. The person who was pointing out all the issues was the GP of my post.

  33. Re:Make better language, not better coders. by Lunix+Nutcase · · Score: 1

    Why you wouldn't want those standards enforced by the compiler I have no idea.

    This reeks of strawman. GP never said or implied any such thing.

  34. Re: I'm worried by what I see. by Anonymous Coward · · Score: 0

    a deterministic crash is infinitely better than the c++ STORAGE CANCER which enable chen, ivan and john to lurk in your kernel and suck off your latest blueprints along with key material.

    memory safety is not about perfect code, it is about perfect, deterministic, debuggable crashes.

    a stopped computer is much better than a pilfered one. kapiert ?

  35. Re:Make better language, not better coders. by Thiez · · Score: 1

    Do those smart pointers also solve iterator invalidation? :)

  36. 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.

  37. Re:Make better language, not better coders. by Lunix+Nutcase · · Score: 1

    Never claimed smart pointers solve all problems because that would be ridiculous. If you have cases that a smart pointer doesn't solve then clearly you would need to use the correct solution. But for the vast majority of cases that people use raw pointers for, they can be substituted with something safer and remove a whole host of potential bugs from their code.

  38. Re:I'm worried by what I see. by Lunix+Nutcase · · Score: 0

    Because there are a ton of bugs. Trying to claim there is only 19 bugs out of 100s of issues is complete silliness.

  39. Re:I'm worried by what I see. by Lunix+Nutcase · · Score: 1

    Oh and to add, it's quite interesting that you ignored the "ICE" label that reports over 200 issues reporting internal compiler errors.

  40. Re:I'm worried by what I see. by Anonymous Coward · · Score: 0

    It's also silly to be hell-bent on focusing on bug counts when ALL languages have hundreds of bugs if you include all of the criteria that the commenter just told you about: specific compilers, documentation, site infrastructure, etc. It's rich enough to try to make some sort of assessment of a language based on bug counts alone, especially one that has had such an open development that we got to see all of the massive changes made to it over time in public. I wonder how many bugs Swift and Go had on their path to 1.0 and beyond?

  41. Re:Make better language, not better coders. by smaddox · · Score: 1

    "Assemblers are an insult to those of us that know what we're doing."
    "High level languages like Fortran and C are an insult to those of us that know what we're doing."
    "High level scripting languages like Bash are an insult to those of us that know what we're doing."
    "High level languages Java are an insult to those of us that know what we're doing."

  42. Re:I'm worried by what I see. by istartedi · · Score: 1

    Of course not all bugs will be labelled correctly,

    Don't worry. Somebody is keeping track of that on 3 by 5 index cards in a shoe-box.

    --
    For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
  43. Re:Make better language, not better coders. by roca · · Score: 1

    There is no useful subset of C++ that is a) statically checkable and b) guarantees absence of dangling pointers and null dereferences.

  44. Re:Make better language, not better coders. by gweihir · · Score: 1

    Your point? That other people say things that _sound_ like what I said does not invalidate my point in the least.

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  45. Re:Make better language, not better coders. by gweihir · · Score: 1

    Indeed. And I have the impression that Rust is not nearly that good, and hence an intense marketing campaign is done.

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  46. Re:Make better language, not better coders. by Actually,+I+do+RTFA · · Score: 1

    Why you wouldn't want those standards enforced by the compiler I have no idea.

    This reeks of strawman. GP never said or implied any such thing.

    It certainly is implied that he is against creating languages that enforce certain standards. Note, almost all standards include "Thou shall not"'s for some language features. You practically have to in C++. I mean, I don't know any (modern) standard that would let you pass and cast tons of void*'s around as the standard case.

    .

    So instead of training better coders in C and C++, just make a language that removes those abilities all together.

    Personally, I prefer my programming language to be willing and powerful enough to do whatever I want it to do.

    --
    Your ad here. Ask me how!