Announcement

Collapse
No announcement yet.

Experimenting Is Underway For Rust Code Within Mesa

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

  • #51
    Originally posted by pal666 View Post
    you have a few typos there which complicate parsing, but nevertheless, i find your unquestionability questionable. most experienced c++ programmers wouldn't leave out variadic templates
    Being an experienced C++ developer is not measured by how many obscure features of the language you use. There are well-known issues with variadic templates that make a strong case for leaving them out. Rust on the other hand has them in the form of declarative macros, except that they are type-safe and memory-safe.

    Originally posted by pal666 View Post
    the world has seen enough rust hype and we know with rust mozilla still produces the worst browser. and as i mentioned, even rust author switched to working on swift in c++. c++ author works in c++ on c++ four decades or so
    C co-creator Ken Thompson is now at Google working on Go so that makes C a total failure, right? A successful project becomes greater than a one-man show. If Stroustrup never moved on beyond C++ that indicates nothing as to the intrinsic qualities or lack thereof of C++ itself, only that he still likes working on C++.

    Comment


    • #52
      Originally posted by pal666 View Post
      you have a few typos there which complicate parsing, but nevertheless, i find your unquestionability questionable. most experienced c++ programmers wouldn't leave out variadic templates
      There is an RFC for variadic templates, they are coming eventually. The pressure, however, is low because of the very nice macro support of the language. In today's rust, std::make_unique ( the go-to example for variadic templates) would be implemented as a macro.

      and as i mentioned, even rust author switched to working on swift in c++. c++ author works in c++ on c++ four decades or so
      You make it sound as if he doesnt like or contribute to rust any more. Let him speak for himself:
      https://www.reddit.com/r/rust/commen...uthor_of_rust/

      To sum it up: he's still contributing, but left leading positions (and thus Mozilla) after burn-out. Clearly, the rust inventor cannot work on rust in a non-leading position at his employer. Thus, he switched to Apple to work on Swift (which he also likes) in a non-leading position. Obviously, swift is not written in rust. Thus, he's not using it at his day job. End of story.

      Clearly, it makes no sense to rewrite code, which is fine, in rust. All these recent news were about using rust alongside existing code.
      Last edited by oleid; 19 September 2021, 02:07 AM.

      Comment


      • #53
        Originally posted by jacob View Post

        There are well-known issues with variadic templates that make a strong case for leaving them out. Rust on the other hand has them in the form of declarative macros, except that they are type-safe and memory-safe.
        Are you sure you're not mixing up variadic templates and variadic preprocessor macros?

        EDIT: But to be fair, I can count the number I used them with one hand. But they can be handy for library design.
        Last edited by oleid; 19 September 2021, 02:01 AM.

        Comment


        • #54
          Originally posted by oleid View Post
          You make it sound as if he doesnt like or contribute to rust any more. Let him speak for himself:
          https://www.reddit.com/r/rust/commen...uthor_of_rust/

          To sum it up: he's still contributing, but left leading positions (and thus Mozilla) after burn-out. Clearly, the rust inventor cannot work on rust in a non-leading position at his employer. Thus, he switched to Apple to work on Swift (which he also likes) in a non-leading position. Obviously, swift is not written in rust. Thus, he's not using it at his day job. End of story.
          This is downplaying it quite a bit, he was also going through a divorce and surgery at the time. But again this is a case of pal666 commenting about stuff before actually researching it.

          Comment


          • #55
            Why are we still arguing about the merits of Rust in 2021? The time for that passed in 2015. Complaints about the difficulty of using Rust were no longer valid beyond 2018. Web developers needing first class language support for async were given that in 2019, and async web frameworks in 2021 are now featureful and easy to work with. Everyone's had time to learn the language and get familiar with it. Most of the world is now depending on large amounts of code written in Rust. Time to put these arguments to rest.

            Comment


            • #56
              Originally posted by mmstick View Post
              Why are we still arguing about the merits of Rust in 2021? The time for that passed in 2015. Complaints about the difficulty of using Rust were no longer valid beyond 2018. Web developers needing first class language support for async were given that in 2019, and async web frameworks in 2021 are now featureful and easy to work with. Everyone's had time to learn the language and get familiar with it. Most of the world is now depending on large amounts of code written in Rust. Time to put these arguments to rest.
              To be fair, Rust is hard to learn at least compared to languages like C, especially programmers coming from that generation where they typically have little experience with languages that have strong type systems (i.e. Rust, Haskell, Scala etc etc).

              The point is though that what you learn from Rust's type system you would eventually learn (in a different way) once you become a good C programmer and you start writing correct C code.

              There is an initial hurdle in Rust that isn't there with C, but in this case C being easy to pick up is incredibly deceitful because it also gives false impression that you can do things correctly in an easy manner.

              Comment


              • #57
                Originally posted by mdedetrich View Post

                To be fair, Rust is hard to learn at least compared to languages like C, especially programmers coming from that generation where they typically have little experience with languages that have strong type systems (i.e. Rust, Haskell, Scala etc etc).

                The point is though that what you learn from Rust's type system you would eventually learn (in a different way) once you become a good C programmer and you start writing correct C code.

                There is an initial hurdle in Rust that isn't there with C, but in this case C being easy to pick up is incredibly deceitful because it also gives false impression that you can do things correctly in an easy manner.
                The type system is not where the difficulty lies in Rust though. The type system is what makes Rust possible to easily learn. And it is easier to learn the type system than to gain mastery of C. Where Rust would give you helpful compiler error messages, C gives you a program that successfully compiled but may encounter a segmentation fault for unknown reasons, or have the application continue to run in a weird unpredictable state. And that's if you can get past the point where the C standard library lacks a lot of functionality that come built into Rust or are easily accessible with Cargo.

                Comment


                • #58
                  Originally posted by jbranso View Post
                  I'm starting to wonder if Zig is a better C alternative? Sorry to start the resulting flame-war....
                  I have some experience with Zig. It is a better alternative to C, but in a world where Rust already exists, it's also not the best option for replacing it if memory safety is a concern.

                  It has an interesting compile-time code generation technique to enable the creation of generic data structures from functions, with methods assigned inside of the structure definition in a way that looks similar to OOP classes. It's also fast to compile so you can reasonably write software with it on a Raspberry Pi 400.

                  But it is still very easy to trigger undefined behavior and cause a segfault if you aren't careful with your memory, and the language is still incomplete in some areas where people wish they could write and use traits like in Rust. So for something that needs to be reasonably production-grade with all the compile-time safety guarantees in Rust, you're not going to find that in Zig.

                  People who complain about use of operator syntax in definitions are still going to complain about this in Zig:
                  Code:
                  pub fn next(self: *Self) ?Entry(*T)
                  .
                  Last edited by mmstick; 19 September 2021, 07:18 AM.

                  Comment


                  • #59
                    Originally posted by pal666 View Post
                    which puts it in same league with rust
                    Bold statement can you proof that with sufficiently ?

                    Comment


                    • #60
                      Originally posted by pal666 View Post
                      mozilla engineers are not very good at c++, that's why they had to invent something else. and 15 years later we see it didn't help mozilla, it's still the worst browser
                      That is such an bullshit argument. Every programmer makes mistakes. Even the mighty Torvalds has introduced memory bugs into his kernel. I much rather rely on the technology stack than on "superior" developers.

                      Comment

                      Working...
                      X