Stories
Slash Boxes
Comments

SoylentNews is people

posted by takyon on Friday May 15 2015, @10:30PM   Printer-friendly
from the already-rusty dept.

After many years of waiting, version 1.0 of the Rust programming language has finally been released. The Rust home page describes Rust as "a systems programming language that runs blazingly fast, prevents nearly all segfaults, and guarantees thread safety."

Thanks to the hard work of noted Rust core team members Yehuda Katz and Steve Klabnik, Rust is now poised to become a serious competitor to established systems programming languages like C and C++.

The announcement has brought much jubilation to the followers of Rust, who have been eagerly awaiting this milestone release for so long. With only 1,940 open issues and over 11,500 issues already closed, Rust is finally ready for users to build fantastically reliable software systems using it.

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 0) by Anonymous Coward on Friday May 15 2015, @10:32PM

    by Anonymous Coward on Friday May 15 2015, @10:32PM (#183516)

    What does Rust give me that modern C++ doesn't already give me?

    I can already get memory safety using modern C++.

    I can already get thread safety using modern C++.

    I can already get "blazingly fast" binaries using modern C++.

    So what does Rust give me that C++ doesn't already give me?

  • (Score: 1, Funny) by Anonymous Coward on Friday May 15 2015, @11:25PM

    by Anonymous Coward on Friday May 15 2015, @11:25PM (#183559)

    It goes to 11.

    • (Score: 4, Touché) by nitehawk214 on Friday May 15 2015, @11:27PM

      by nitehawk214 (1304) on Friday May 15 2015, @11:27PM (#183561)

      So does C++ [wikipedia.org]

      --
      "Don't you ever miss the days when you used to be nostalgic?" -Loiosh
      • (Score: 1, Funny) by Anonymous Coward on Saturday May 16 2015, @03:09AM

        by Anonymous Coward on Saturday May 16 2015, @03:09AM (#183642)

        Actually, it goes to 14 [wikipedia.org]. Soon it will go to 17!

        Take that Rust! You'll need to pull off a Firefox if you want to catch up.

        • (Score: 3, Interesting) by davester666 on Sunday May 17 2015, @05:48AM

          by davester666 (155) on Sunday May 17 2015, @05:48AM (#183969)

          Isn't Mozilla driving this project? It's probably up to 5.0 already.

    • (Score: 0) by Anonymous Coward on Saturday May 16 2015, @02:18AM

      by Anonymous Coward on Saturday May 16 2015, @02:18AM (#183622)

      I guess only us geezers would get the reference [youtube.com].

  • (Score: 2, Troll) by bob_super on Friday May 15 2015, @11:30PM

    by bob_super (1357) on Friday May 15 2015, @11:30PM (#183563)

    A name that evokes decay instead of something positive? Another way to confuse people when you talk about your job? Something different, to appeal to your hipster self? Something your current PHB can't comment on, even if he was a software guy before crossing to the dark side?
    Still looking for the actual positive, bear with me...

    • (Score: 3, Insightful) by Marand on Saturday May 16 2015, @05:44AM

      by Marand (1081) on Saturday May 16 2015, @05:44AM (#183667) Journal

      A name that evokes decay instead of something positive?

      Because, when choosing a programming language, its name is the most important consideration. Rust? Must be old and creaky. C and C++? Those sound like bad grades, nobody will use those. D is a worse grade than C, so it's right out, but A+ [wikipedia.org] is awesome because it evokes thoughts of good grades.

      You also have to watch out for Python, because snakes are icky. And don't even get me started on Perl and Ruby! Pearls and rubies are expensive, so while those are obviously high-quality languages, you have to expect maintenance costs for using them will be high as well. Swift's the best language, though, because it sounds fast. It's like putting flame stickers on your car -- just naming it Swift makes it faster. That's science, son! You can't argue with that!

      I don't care about Rust, but if you're going to bitch about a language, come up with something more concrete than "lol the name is dumb" because that complaint is fucking stupid. The AC troll that keeps showing up to complain about the language changing drastically and claiming that Rust programs crash a lot is doing this better than you.

      • (Score: 2) by bob_super on Sunday May 17 2015, @03:13AM

        by bob_super (1357) on Sunday May 17 2015, @03:13AM (#183931)

        And you have clearly supplied unquestionable evidence in response to the original question (which is still the title of the post).

        I merely pointed out that something that's brand new, and doesn't provide unquestionable technical advantages, should at least come with a name that makes PHBs feel good when they present their budgets. I'm sorry if my reality offends you, but it contains lots of really dumb PHBs and billions in advertising dollars.

        • (Score: 2) by Marand on Sunday May 17 2015, @03:58AM

          by Marand (1081) on Sunday May 17 2015, @03:58AM (#183950) Journal

          And you have clearly supplied unquestionable evidence in response to the original question (which is still the title of the post).

          I was making a joke about part of your of your troll post, not making any effort to defend Rust. Even if I wanted to defend it -- and I don't, because I don't care for Rust anyway -- I wouldn't be wasting the time doing it to you, because you entered the conversation with heavy bias to begin with. Your subject was a question, sure, but then you followed it with a bunch of loaded hostility that essentially said "I have already formed an opinion about this and decided my language is superior, JUST TRY to prove me wrong, I WANT TO ARGUE"

          Hell, you're still doing it. My comment went off on a tangent based on a small part of your post, because I wasn't interested in taking your bait, so of course your response attempted to steer it back toward your original trolling so that you can proclaim the superiority of your language of choice. Thing is, I don't even care about that. If Rust works for someone, cool. If it doesn't for someone else, that's cool too. I don't really care for either C++ or Rust (I'd rather see more usage of D), so if that's the argument you want (and it seems to be), you're better off looking elsewhere.

          I just saw the silly "Rust is a bad name lol" thing and thought it would be funny to follow the absurd argument to its extreme.

          • (Score: 2) by bob_super on Sunday May 17 2015, @04:08AM

            by bob_super (1357) on Sunday May 17 2015, @04:08AM (#183952)

            > you can proclaim the superiority of your language of choice

            That would be Verilog and various scripting ones, making you whole point moot.
            I'm sorry if you thought I was a trolling zealot; I have not stake in the whole Rust/C argument.

    • (Score: 4, Funny) by maxwell demon on Saturday May 16 2015, @07:10AM

      by maxwell demon (1608) on Saturday May 16 2015, @07:10AM (#183678) Journal

      A name that evokes decay instead of something positive?

      Hah, I can do better. I hereby introduce my new programming language: Bitrot.

      And Bitrot is really better than Rust, because it only has two bugs:

      1. There is no specification
      2. There is no implementation

      But then, it is absolutely impossible to write a buggy program in Bitrot. Take that, Rust!

      --
      The Tao of math: The numbers you can count are not the real numbers.
  • (Score: 2) by mtrycz on Friday May 15 2015, @11:43PM

    by mtrycz (60) on Friday May 15 2015, @11:43PM (#183572)

    Maybe Rust's syntax is decidable?

    --
    In capitalist America, ads view YOU!
  • (Score: 0) by Anonymous Coward on Saturday May 16 2015, @12:09AM

    by Anonymous Coward on Saturday May 16 2015, @12:09AM (#183584)

    It would have been far more succinct to just write "Get off my lawn, dammit!!!"

  • (Score: 1, Interesting) by Anonymous Coward on Saturday May 16 2015, @03:55AM

    by Anonymous Coward on Saturday May 16 2015, @03:55AM (#183652)

    You gain modules and their related compile time improvements, better option/union type support with pattern matching, compiler enforced thread safety/no data races, more robust templates with better errors, not needing header files, simpler syntax etc.

    Personally I like the more expression oriented style, memory safety and provable lack of memory leaks and dangling pointer bugs. It keeps the main feature of C++ I care about (the ability to call C and C++ code, and be called by it). Rust is a decent language to write a module for an otherwise C or C++ project in if you want some of its features.

    • (Score: 1, Interesting) by Anonymous Coward on Saturday May 16 2015, @05:19AM

      by Anonymous Coward on Saturday May 16 2015, @05:19AM (#183657)

      You gain modules and their related compile time improvements

      The module system is nowhere near as flexible as the options that C++ allows for, both file-based and in terms of namespaces and classes. Besides, all modern C++ compilers have supported precompiled headers for ages, which drastically improves compilation time.

      better option/union type support with pattern matching

      After using this in Haskell and Scala, it's useful, but not that useful. Much of this can be done using C++'s templates well enough.

      compiler enforced thread safety/no data races

      This is only as good as the language implementation is. Rust is a language with a single implementation with almost 2,000 open issues. If the implementation is so broken, how can I be sure that whatever the compiler is enforcing is being done correctly?

      more robust templates with better errors

      I don't think that's true. C++'s templates are quite robust and powerful already. Rust doesn't really improve on that. Modern C++ compilers, especially Clang, offer very comprehensible and useful template error messages these days. Even GCC is getting better.

      not needing header files

      Header files aren't a bad thing. They're quite powerful.

      simpler syntax

      Rust's syntax is very similar to C++'s. C++'s syntax is generally quite straightforward. Even C++'s semantics are quite easy, compared to stuff like Rust's ownership semantics.

      In closing, it has taken Rust years to get to this point, and there's not much to show for it. I don't think we'll see any miracles that suddenly allow it to become any better than it already is (or isn't).

      • (Score: 1, Interesting) by Anonymous Coward on Saturday May 16 2015, @05:57AM

        by Anonymous Coward on Saturday May 16 2015, @05:57AM (#183669)

        Regarding your comment on thread safety: the threading/sync stuff is actually a library feature (they rewrote it to be such recently). Rust's owner ship semantics are enough to make that possible. Fixing the few remaining holes in the compiler soundness checks should be easier than fixing even one large C++ project, and it will fix all the rust projects.

        As for templates: personally I like that that templates only validate once: you can't have a compile error in a particular instantiantion, and its clear what types are legal to paramaterize it with.

        If you like header files and get along well with precompiled headers, stick with your c++. I'm just happy I can call your code from rust :)

        C++ is a great language if you are a badass, but I'm much rather hire devs to write me rust than C++ where there is so much less shit they can get wrong. I could trust interns to write secure multithreaded code thats performant (Don't do that in most languages). Its also far harder to break when refactoring (The completeness guarantees on match are one such example).

        • (Score: 0) by Anonymous Coward on Saturday May 16 2015, @01:03PM

          by Anonymous Coward on Saturday May 16 2015, @01:03PM (#183741)

          Rust's owner ship semantics are enough to make that possible.

          Rust's ownership semantics will leave you scratching your head, and then once you finally understand how it's supposed to work, you'll still end up fighting the compiler.

      • (Score: 4, Insightful) by maxwell demon on Saturday May 16 2015, @07:22AM

        by maxwell demon (1608) on Saturday May 16 2015, @07:22AM (#183680) Journal

        C++'s syntax is generally quite straightforward.

        I disagree with this. It shows on many places that the C syntax on which it builds simply wasn't made for it, and some added syntax also is not exactly helpful.

        Consider the following code, and think about why you need the bolded keywords:

        template<typename T, typename U> typename T::value_type f(T t, U u)
        {
              T foo(U()); // C++'s most vexing parse; do you see what's wrong?
              return foo.template frobnicate<int>(u);
        }

        Don't get me wrong, C++ is the best language I know. But its syntax is not its strong point.

        --
        The Tao of math: The numbers you can count are not the real numbers.
        • (Score: 2) by tonyPick on Saturday May 16 2015, @08:01AM

          by tonyPick (1237) on Saturday May 16 2015, @08:01AM (#183687) Homepage Journal

          Templates can lead to some really odd cases: See also this blog post [reverberate.org].

          Responding to the GP point: C++ syntax can be straightforward provided you only use a subset of the features; however nobody can agree on what that subset is, and as soon as you use someone else's code/library then the complexity explodes. The C++ standards approach of "throw another feature into the mix" isn't helping any.

  • (Score: 4, Informative) by turgid on Saturday May 16 2015, @09:07AM

    by turgid (4318) Subscriber Badge on Saturday May 16 2015, @09:07AM (#183698) Journal

    What does Rust give me that modern C++ doesn't already give me?

    I can already get memory safety using modern C++.

    With great difficulty and the help of three policemen.

    I can already get thread safety using modern C++.

    Again, with great difficulty, the help of three policemen and an awful lot of debugging.

    I can already get "blazingly fast" binaries using modern C++.

    On a very expensive CPU with huge amounts of cache memory.

    So what does Rust give me that C++ doesn't already give me?

    Fewer lines of code to achieve the same thing? Less effort, more productivity? Less demented syntax? I don't know. I don't follow faddy languages and hokey religions, especially not C++.

    • (Score: 2) by maxwell demon on Saturday May 16 2015, @11:13AM

      by maxwell demon (1608) on Saturday May 16 2015, @11:13AM (#183720) Journal

      I can already get memory safety using modern C++.

      With great difficulty and the help of three policemen.

      RAII is not "great difficulty". Of course if you insist to still use manual new/delete, then things can get complicated. But there's normally no reason to do that.

      I can already get "blazingly fast" binaries using modern C++.

      On a very expensive CPU with huge amounts of cache memory.

      You demonstrate that you have no clue about C++. C++ code runs just as fast as C code, unless it got programmed by a complete moron.

      --
      The Tao of math: The numbers you can count are not the real numbers.
      • (Score: 3, Insightful) by turgid on Saturday May 16 2015, @11:21AM

        by turgid (4318) Subscriber Badge on Saturday May 16 2015, @11:21AM (#183721) Journal

        You demonstrate that you have no clue about C++. C++ code runs just as fast as C code, unless it got programmed by a complete moron.

        I've seen an awful lot of C++ code over the years, and the more I see of it, the more I realise that 99.9% is written by complete morons.

        C++ code tends to be complex, brittle and buggy, slow to compile, hard to debug (people think the "strict type safety" of C++ absolves them of writing unit tests and checking errors), incompatible at the binary level with everything else (and the library you compiled last week)...

        And lets not mention that C++ people are allergic to actually writing proper code to solve a specific problem because there are "standard libraries" that they can throw at it until it superficially hides it.

        And just what on earth are C++ exceptions about? Talk about giving people a machine gun to shoot themselves in the foot with...

        C++ will always be with us, I'm afraid, so it's best to know your enemy.

        If you're thinking about writing something in C++, do yourself and the world a favour an write it in plain C. You stand a chance of getting it to work correctly, understanding it 6 months later, and being able to reuse it in another project.

        • (Score: 2) by maxwell demon on Saturday May 16 2015, @12:11PM

          by maxwell demon (1608) on Saturday May 16 2015, @12:11PM (#183731) Journal

          So you think the people who don't write unit tests for C++ would write them for C?

          And what is wrong with using the standard library? Do you also reimplement printf to avoid using the C standard library? The standard library is there to be used, and should consist of decent code; if not, use another vendor (if the standard library implementation is shit, probably the compiler is, too).

          Of course you have to learn how to correctly use the library, just as you have to learn how to correctly use the language (and mind you, there's more than enough C code written by morons as well). If you think that implementing a stack by inserting/removing values at the beginning of a vector (yes, I've seen that!) is a good idea, then you are simply clueless. But that's not a fault of the standard library, that is the fault of the code author.

          And there are many more ways to shoot yourself in the foot with C style return-error-code error handling; You can simply ignore errors without immediate consequences — until the error actually occurs. In which case the ignored error can have fatal consequences. Now in C++, you of course also can ignore exceptions, but you have to do so explicitly. just not handling the exceptions will cause the program to terminate, instead of simply continuing despite of the error.

          And of course, if you prefer C-style error handling, you can use it in C++ as well; however you can even improve on that by making completely ignoring the return value a runtime hard fail even if no error occurred (I don't know a way to make it a compile time error, though).

          --
          The Tao of math: The numbers you can count are not the real numbers.
        • (Score: 0) by Anonymous Coward on Saturday May 16 2015, @06:52PM

          by Anonymous Coward on Saturday May 16 2015, @06:52PM (#183801)

          People who write bad C++ code aren't going to magically write good Rust code!

          • (Score: 0) by Anonymous Coward on Monday May 18 2015, @07:03PM

            by Anonymous Coward on Monday May 18 2015, @07:03PM (#184724)

            No, they're going to hang out on interweb forums boasting about how wonderful C++ is and that all the people that can't see that are ignorant morons.

        • (Score: 1, Funny) by Anonymous Coward on Saturday May 16 2015, @10:09PM

          by Anonymous Coward on Saturday May 16 2015, @10:09PM (#183850)

          I've seen an awful lot of C++ code over the years, and the more I see of it, the more I realise that 99.9% is written by complete morons.

          OTOH Rust will attract programmers who are far, far, above average, and will be studiously careful to use the language only in the right way...

          • (Score: 1, Funny) by Anonymous Coward on Sunday May 17 2015, @10:48PM

            by Anonymous Coward on Sunday May 17 2015, @10:48PM (#184202)

            Even the designers of Rust couldn't implement the Rust compiler using Rust without introducing a shitload of bugs.

      • (Score: 3, Interesting) by bart9h on Saturday May 16 2015, @12:43PM

        by bart9h (767) on Saturday May 16 2015, @12:43PM (#183736)

        C++ could run just as fast as C code, *IF* you mostly use C-style coding.

        I once rewrote a routine to read a file huge text file with 3D coordinates and values,
        from using standard C++ streams to C's fscanf().

        It was EIGHT times faster. And no, it was not badly written in C++. I had already optimized the hell of it, avoiding creating std::string objects, etc, even with the help of my brilliant coworkers (one of them, which is a HUGE fan of C++, was latter hired by Amazon).

  • (Score: 3, Insightful) by bart9h on Saturday May 16 2015, @12:32PM

    by bart9h (767) on Saturday May 16 2015, @12:32PM (#183735)

    A better question would be,

    What does Rust give me that D doesn't?

    • (Score: 0) by Anonymous Coward on Sunday May 17 2015, @07:38AM

      by Anonymous Coward on Sunday May 17 2015, @07:38AM (#183982)

      No GC.

  • (Score: 1, Funny) by Anonymous Coward on Monday May 18 2015, @02:36PM

    by Anonymous Coward on Monday May 18 2015, @02:36PM (#184560)

    Simple. Widespread adoption and popularity of Rust gives you tons of 'obsolete' C/C++ code and CS grads that only know Rust. In turn, this allows you to charge more for your C/C++ coding skills. Are you ready to support Rust now?