Announcement

Collapse
No announcement yet.

Rust Porting Begins For Intel's "e1000" Linux Network Driver

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

  • #71
    Originally posted by mdedetrich View Post
    Considering when on the topic of Rust you spent your entire time constantly negatively criticising it without giving it a benefit of a doubt
    It's probably the first Rust topic I decided to post something against Rust.

    (like all of the software engineers much smarter and with more knowledge on this topic then you) I can safely say that it represents reality quite well.
    Rust somehow forces you to became better developer and that's probably good. It's against duplication (and that's sometimes good as well). However, it's also matter of taste. While it's C like language (or tries to be) its syntax is far from C. It's against duplication, so we can't use ternary conditional operator, but it has SIX string types same time. I can't figure out who their target developers are.

    Comment


    • #72
      Originally posted by Weasel View Post
      Except auto is only used when the type is not specified. And it means automatic type deduction. You don't type it when you specify the type.

      In Rust you have to specify both let and the type of the variable if you don't want an automatic type deduction. Which is just cringe.

      Also in JavaScript you can use "var" as well, AFAIK. Which is infinitely better than "let".
      "let" in Rust is not equal to "var" in other languages because it's also a pattern matching operator. For simple cases it looks like a variable declaration but it can do more. It can be also combined with "mut" to declare a mutable variable. The "<type> <name>" prefix notation for variable declaration which is used in C and C++ is horrible for many reasons. It's good that newer languages don't follow it.

      Comment


      • #73
        Originally posted by Volta View Post
        but it has SIX string types same time. I can't figure out who their target developers are.
        It can be indeed confusing when people are coming from other languages but it makes sense when you learn it.

        Comment


        • #74
          Originally posted by kpedersen View Post

          Exactly. So my point is that perhaps Rust's strengths are not ideal here. It will all just be bindings and unsafe {} sections.

          In practice they are 100% equally as safe. Which is completely "unsafe" because all bets are off. Arguably the extra code needed for the Rust bindings "abstractions" open up a potential for more complex data marshalling issues and reduction of type safety.

          ‚Äč
          But that's the point of unsafe block in Rust. It's not like you are not supposed to ever use it and if you do then you are using Rust in wrong way. The point of unsafe is to have block of code that is separated from safe code. Instead of having all your code as "unsafe" (in Rust terms) like you would with C, you have only parts of the code as unsafe. So instead of having unsafe code you have safe code with unsafe parts. That separation is one of the Rust strength as well.

          Comment


          • #75
            Originally posted by Weasel View Post
            That's exactly the problem. Let should only be used for functional languages, which Rust is not. There's a reason they're so cryptic for programmers instead of math nerds. Keep that shit away from structured languages.
            Basic used the let keyword to assign too. That was in the late '60s. It was not a functional language, no sir.

            Comment


            • #76
              Originally posted by Volta View Post

              I think (and hope) it's not such common when value equals 1. I've just check and incrementation and decrementation in C like way is not possible in Rust. WTF?
              You mean i++. Or was it ++i. Actually it is very common in code bases to require "one operation per line", so that "++i" has to live in it's own line.

              Originally posted by Volta View Post
              I'm not used to beg someone to 'let' me something. The one who chose this word must be some kind of beta
              That betas were mathematicians. In mathematics it is very common to start a proof with "Let".

              Comment


              • #77
                Originally posted by Weasel View Post
                That's exactly the problem. Let should only be used for functional languages, which Rust is not. There's a reason they're so cryptic for programmers instead of math nerds. Keep that shit away from structured languages.
                You mean programmers cannot adapt and learn?

                Comment


                • #78
                  Originally posted by Volta View Post

                  I think (and hope) it's not such common when value equals 1. I've just check and incrementation and decrementation in C like way is not possible in Rust. WTF?

                  I'm not used to beg someone to 'let' me something. The one who chose this word must be some kind of beta. I'd prefer something like: auto name_of_var. 'Let' is completely unintuitive. Thanks for explanation btw.
                  this guy wins best comment. some legend tries to correct him by saying gross syntax is quite common actually, ... lmao yeah no kidding. somebody promote this legend to chief detective

                  Comment


                  • #79
                    Originally posted by oleid View Post
                    That betas were mathematicians. In mathematics it is very common to start a proof with "Let".
                    Exactly. And it is used as a declaration: "Let x be an element of the set of all natural numbers" = "let int x;"
                    Last edited by reba; 19 September 2022, 05:23 PM.

                    Comment


                    • #80
                      Originally posted by Volta View Post
                      but it has SIX string types same time..
                      Four of those exist solely to make it not a complete nightmare to interop with other systems' broken string implementations.

                      Comment

                      Working...
                      X