Announcement

Collapse
No announcement yet.

Rust UEFI Firmware Targets Look For A Promotion To Tier-2

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

  • Rust UEFI Firmware Targets Look For A Promotion To Tier-2

    Phoronix: Rust UEFI Firmware Targets Look For A Promotion To Tier-2

    David Rheinsberg of Red Hat who is a contributor to systemd, BUS1, KMSCON, and other projects over the years is leading an effort seeking to get Rust's UEFI firmware targets promoted to a tier-2 class...

    https://www.phoronix.com/news/Rust-U...re-Hope-Tier-2

  • #2
    I wish the Rust syntax for generics was Foo<Bar> instead of Foo::<Bar>, I don't like all these :: in the syntax.

    Comment


    • #3
      Originally posted by uid313 View Post
      I wish the Rust syntax for generics was Foo<Bar> instead of Foo::<Bar>, I don't like all these :: in the syntax.
      "::" would make it more unambiguous when compared to "a < b > c"

      Comment


      • #4
        Originally posted by uid313 View Post
        I wish the Rust syntax for generics was Foo<Bar> instead of Foo::<Bar>, I don't like all these :: in the syntax.
        You can do this: <Foo<Bar>>::method().

        Comment


        • #5
          Originally posted by uid313 View Post
          I wish the Rust syntax for generics was Foo<Bar> instead of Foo::<Bar>, I don't like all these :: in the syntax.
          For all its strong points, readability is definitely not one of them. It's still better than C's "it's meant to be run, not read"

          Comment


          • #6
            Originally posted by bug77 View Post
            It's still better than C's
            God, no. Not even close. It has non-optional let for crying out loud.

            Comment


            • #7
              I tried Rust and Actix web framework and I'm impressed by result - very fast execution and very small memory usage.

              Comment


              • #8
                Originally posted by uid313 View Post
                I wish the Rust syntax for generics was Foo<Bar> instead of Foo::<Bar>, I don't like all these :: in the syntax.
                It is. The "turbofish syntax" (that ::<> thing)​ only crops up when you have a method that's generic over its return type and the type inference needs you to clarify what you expect out of it and you're not assigning it directly to a variable you can type-annotate instead.

                This...

                let x = my_thing.iter().filter(...).map(...).collect::<Vec <_>>().something();

                ...is equivalent to this

                let y: Vec<_> = my_thing.iter().filter(...).map(...).collect();
                let x = y.something();


                (Note that, since the type is a pattern match, you can even wildcard away the bits that are unambiguous with an underscore. In fact, 99% of the time you need it, it's that magic Iterator::collect() method that can perform a million different transformations for you, such as turning Iterator<Item=Result<T, E>> into Result<Vec<T>, E> for bailing out on first error.)

                Originally posted by NobodyXu View Post

                "::" would make it more unambiguous when compared to "a < b > c"

                ...and enough people have tried to propose RFCs to change it without taking that problem into account that the parser test includes a message in the description that vaguely reminds me of Ozymandias's "Look on my works ye Mighty, and despair!".

                Originally posted by Weasel View Post
                God, no. Not even close. It has non-optional let for crying out loud.
                As with the turbofish syntax, that's to make the grammar simpler to parse. In that case, it's to avoid The Lexer Hack.​​
                Last edited by ssokolow; 12 September 2022, 11:18 AM.

                Comment


                • #9
                  I know that rewrite-it-in-rust is a meme but edk2 would really benefit that since both the UEFI spec and Intel's implementation of that ("edk2") try really hard to do objects and interfaces in C.

                  No idea if that's on anyone's agenda though or if they wanna stick to writing UEFI apps and drivers in rust.

                  Comment


                  • #10
                    readability is up to the individual, I find rust code some of the easiest to read

                    Comment

                    Working...
                    X