Announcement

Collapse
No announcement yet.

Mozilla Updates To Rust 0.9 Programming Language

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mozilla Updates To Rust 0.9 Programming Language

    Phoronix: Mozilla Updates To Rust 0.9 Programming Language

    Mozilla developers working on the interesting Rust programming language have updated it to version 0.9 on Thursday as they continue adding new features and functionality to this language that one day could be powering Firefox and other applications...

    http://www.phoronix.com/vr.php?view=MTU2Njg

  • #2
    I really like this initiative. If we could replace all C and C++ with Rust some common security problems would go away.

    Comment


    • #3
      Out of the 3 major contenders in the new system level languages category (D, Go and Rust) this is the one that I think shows the most potential as something I would like to replace C with. It is still a bit early yet to adopt for my taste, that might change once it reaches 1.0 and the dust starts to settle.

      Comment


      • #4
        Originally posted by IanS View Post
        Out of the 3 major contenders in the new system level languages category (D, Go and Rust) this is the one that I think shows the most potential as something I would like to replace C with. It is still a bit early yet to adopt for my taste, that might change once it reaches 1.0 and the dust starts to settle.
        See, that's the thing, I don't see Rust and Go as system-level languages. To me, it seems like this:
        D is designed to replace System-Level C code (Kernels, Drivers that aren't written in ASM, etc)
        Go is designed to replace Application-Level C code (Browsers, music players, etc)
        Rust is designed to supersede C++ code in most areas, but seems to focus quite a bit on the Application-Level over System-Level

        At least that's what I've seen so far. This is why I don't get it when people are arguing about D vs Go vs Rust; they're not designed for the same thing (even Go and Rust, as they do things in very different ways internally)

        Comment


        • #5
          According to the guy who started the language, it is meant as a system language that will compete with C and C++; here is an interview with him.

          I can't see anything that C or C++ offers that make them more suited for system level uses than Rust. Now I should say that I don't see the Linux kernel moving away from C any time soon and I personally don't limit my definition of system level programs to just the kernel/drivers. In more general terms, I am looking at it as a language I can turn to when higher level languages like Python and such aren't good enough performance wise for the task at hand. Which is generally the only time I turn to C the way it is and why I am looking at Rust as a replacement for the niche C fills for me now.

          Comment


          • #6
            Underrated?

            Rust seems pretty cool.
            Is it underrated?
            Perhaps the most underrated language?

            Wonder if the Linux kernel could be ported to Rust.
            Would it make sense?

            Comment


            • #7
              Linus has stated that he thinks most newer languages-- newer than circa 1975-- are just too high-level for use in the kernel. He likes C because it's easy for him to see how it will compile into machine code. I don't know how most other kernel devs feel, but at least for Linus' tenure, that's the bar. All that said, I don't know enough about compilers, machine code or any of these new languages to say whether or not any of them might meet that bar. My guess is definitely not for Go, maybe for Rust and D. Even if they are I think it would likely be another 10-20 years before they're accepted enough to make the switch.

              Comment


              • #8
                If you wanna replace C or C++ create exactly these langs but without their historical burden. If you settle for more you're in the alley of failed langs like Vala, D etc who're never gonna replace C/C++ or attract critical mass.

                Comment


                • #9
                  Originally posted by mark45 View Post
                  If you wanna replace C or C++ create exactly these langs but without their historical burden. If you settle for more you're in the alley of failed langs like Vala, D etc who're never gonna replace C/C++ or attract critical mass.
                  That's uninteresting because of the memory safety problems inherent in the languages. What purpose would there be for a language exactly like C except for ... what? What would you change? The syntax? That's not a compelling reason to switch languages, even if it's a mechanical transformation. C++ is far too complex to even possibly recreate.

                  Comment


                  • #10
                    Originally posted by lamawithonel View Post
                    Linus has stated that he thinks most newer languages-- newer than circa 1975-- are just too high-level for use in the kernel. He likes C because it's easy for him to see how it will compile into machine code. I don't know how most other kernel devs feel, but at least for Linus' tenure, that's the bar. All that said, I don't know enough about compilers, machine code or any of these new languages to say whether or not any of them might meet that bar. My guess is definitely not for Go, maybe for Rust and D. Even if they are I think it would likely be another 10-20 years before they're accepted enough to make the switch.
                    My problem with that statement is that C compilers do a considerable amount of damage to your code to make it fast. Maybe with GNU extensions you can annotate it enough to be able to understand what it's going to be translated as. I don't think Linux will ever use a different implementation language. Too much inertia.

                    Comment


                    • #11
                      Originally posted by Daktyl198 View Post
                      See, that's the thing, I don't see Rust and Go as system-level languages. To me, it seems like this:
                      D is designed to replace System-Level C code (Kernels, Drivers that aren't written in ASM, etc)
                      Go is designed to replace Application-Level C code (Browsers, music players, etc)
                      Rust is designed to supersede C++ code in most areas, but seems to focus quite a bit on the Application-Level over System-Level

                      At least that's what I've seen so far. This is why I don't get it when people are arguing about D vs Go vs Rust; they're not designed for the same thing (even Go and Rust, as they do things in very different ways internally)
                      We are a systems language with a focus on systems. We're even working on getting our standard library working in kernel space. You would never be able to write a browser in Go because of the garbage collector, lack of inheritance, etc. The performance would just be plain terrible. Writing kernels in D is possible but the language's safety depends on a garbage collector. It's a cool project though!

                      Rust is the only language in its space. Compiler-guaranteed zero-overhead memory safety. Someone in IRC is porting their multitasking kernel to Rust and has only had a single triple fault so far.

                      Comment


                      • #12
                        Originally posted by Pajn View Post
                        I really like this initiative. If we could replace all C and C++ with Rust some common security problems would go away.
                        We're not a valid C++ replacement for certain uses of it. We lack templates, and templates are extremely powerful as an abstraction mechanism. Eigen or Boost could never exist for Rust, we simply don't have the expressive power. Of course, our type system makes up for it in other ways, but it rules us out in some categories of usage.

                        Comment


                        • #13
                          Originally posted by Pajn View Post
                          I really like this initiative. If we could replace all C and C++ with Rust some common security problems would go away.
                          Replacing "all C and C++" is right behind "world peace" in terms of scope. :-)

                          Comment


                          • #14
                            Originally posted by cmr~ View Post
                            That's uninteresting because of the memory safety problems inherent in the languages. What purpose would there be for a language exactly like C except for ... what? What would you change? The syntax? That's not a compelling reason to switch languages, even if it's a mechanical transformation. C++ is far too complex to even possibly recreate.
                            I know one thing I would change: the grammar. For example, production 4 in the K&R grammar looks like

                            declaration:
                            declaration-specifiers init-declarator-list SEMICOLON
                            declaration-specifiers SEMICOLON

                            This allows things like

                            int;

                            which compiles with a warning. It can't be an error (for historic reasons), even though it's a useless declaration, because the grammar allows it.

                            Another example is the declaration-specifiers production, which allows all of the following declarations:

                            static const int n = 42;

                            const static int n = 42;

                            int static const n = 42;

                            and others.

                            The grammar is simple, which makes it easy to port, but it adds unnecessary complication to the language. Moving the complexity from the language to the parser would be an improvement, since the parser is only written once, but is used to produce countless other programs.

                            Comment


                            • #15
                              Originally posted by mark45 View Post
                              If you wanna replace C or C++ create exactly these langs but without their historical burden. If you settle for more you're in the alley of failed langs like Vala, D etc who're never gonna replace C/C++ or attract critical mass.
                              Yes, historical burden. My favorite example is C's use of the break keyword to end a case statement, which means that one can't break from a loop from an enclosed switch statement without a lot of horsing around. The creators of BCPL recognized and fixed this problem in the late sixties. C is based on an earlier version of BCPL, so it didn't fix this problem. Unfortunate, but understandable. But there's no excuse for Java and later languages that adopted C switch statement syntax some two decades (or more) later.

                              Comment

                              Working...
                              X