Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. I am NOT making a Rust replacement, but — if you could fix one* thing about Rust syntax/semantics/etc.

I am NOT making a Rust replacement, but — if you could fix one* thing about Rust syntax/semantics/etc.

Scheduled Pinned Locked Moved Uncategorized
120 Posts 48 Posters 160 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • fasterthanlime@hachyderm.ioF fasterthanlime@hachyderm.io

    I am NOT making a Rust replacement, but — if you could fix one* thing about Rust syntax/semantics/etc. what would you fix?

    (*one per reply, multiple replies per household are allowed)

    cyberia@tilde.zoneC This user is from outside of this forum
    cyberia@tilde.zoneC This user is from outside of this forum
    cyberia@tilde.zone
    wrote last edited by
    #2

    @fasterthanlime I think I'd allow anonymous structs/enums. Often I find myself reaching to create an enum field inside a struct and it's annoying having to make a whole separate named declaration for it.

    poliorcetics@social.treehouse.systemsP O 2 Replies Last reply
    0
    • fasterthanlime@hachyderm.ioF fasterthanlime@hachyderm.io

      I am NOT making a Rust replacement, but — if you could fix one* thing about Rust syntax/semantics/etc. what would you fix?

      (*one per reply, multiple replies per household are allowed)

      piegames@flausch.socialP This user is from outside of this forum
      piegames@flausch.socialP This user is from outside of this forum
      piegames@flausch.social
      wrote last edited by
      #3

      @fasterthanlime make non-zero cost abstractions with good-enough performance tradeoffs for most use cases a first class citizen

      dmerej@mamot.frD 1 Reply Last reply
      0
      • piegames@flausch.socialP piegames@flausch.social

        @fasterthanlime make non-zero cost abstractions with good-enough performance tradeoffs for most use cases a first class citizen

        dmerej@mamot.frD This user is from outside of this forum
        dmerej@mamot.frD This user is from outside of this forum
        dmerej@mamot.fr
        wrote last edited by
        #4

        @piegames @fasterthanlime replace 'fn' keyword by 'fun' - Kotlin got it right !

        1 Reply Last reply
        0
        • fasterthanlime@hachyderm.ioF fasterthanlime@hachyderm.io

          I am NOT making a Rust replacement, but — if you could fix one* thing about Rust syntax/semantics/etc. what would you fix?

          (*one per reply, multiple replies per household are allowed)

          latenightowl@social.linux.pizzaL This user is from outside of this forum
          latenightowl@social.linux.pizzaL This user is from outside of this forum
          latenightowl@social.linux.pizza
          wrote last edited by
          #5

          @fasterthanlime Have one way to convert between types. Differences between as, into, from, to_, ...

          1 Reply Last reply
          0
          • fasterthanlime@hachyderm.ioF fasterthanlime@hachyderm.io

            I am NOT making a Rust replacement, but — if you could fix one* thing about Rust syntax/semantics/etc. what would you fix?

            (*one per reply, multiple replies per household are allowed)

            musicmatze@social.linux.pizzaM This user is from outside of this forum
            musicmatze@social.linux.pizzaM This user is from outside of this forum
            musicmatze@social.linux.pizza
            wrote last edited by
            #6

            @fasterthanlime standard library associated types are named in an uniform way: `Error`. No `Err` anymore anywhere!

            1 Reply Last reply
            0
            • fasterthanlime@hachyderm.ioF fasterthanlime@hachyderm.io

              I am NOT making a Rust replacement, but — if you could fix one* thing about Rust syntax/semantics/etc. what would you fix?

              (*one per reply, multiple replies per household are allowed)

              latenightowl@social.linux.pizzaL This user is from outside of this forum
              latenightowl@social.linux.pizzaL This user is from outside of this forum
              latenightowl@social.linux.pizza
              wrote last edited by
              #7

              @fasterthanlime The syntax for traits: in my head, "I am writing a struct implementing this trait", not "this trait is also implemented by my struct".

              soc@chaos.socialS 1 Reply Last reply
              0
              • fasterthanlime@hachyderm.ioF fasterthanlime@hachyderm.io

                I am NOT making a Rust replacement, but — if you could fix one* thing about Rust syntax/semantics/etc. what would you fix?

                (*one per reply, multiple replies per household are allowed)

                lizzy@social.vlhl.devL This user is from outside of this forum
                lizzy@social.vlhl.devL This user is from outside of this forum
                lizzy@social.vlhl.dev
                wrote last edited by
                #8
                @fasterthanlime redo cargo from scratch, it doesn't work for anyone except upstream developers and it is the reason for 95% of the hate that rust gets.
                lizzy@social.vlhl.devL fasterthanlime@hachyderm.ioF 2 Replies Last reply
                0
                • cyberia@tilde.zoneC cyberia@tilde.zone

                  @fasterthanlime I think I'd allow anonymous structs/enums. Often I find myself reaching to create an enum field inside a struct and it's annoying having to make a whole separate named declaration for it.

                  poliorcetics@social.treehouse.systemsP This user is from outside of this forum
                  poliorcetics@social.treehouse.systemsP This user is from outside of this forum
                  poliorcetics@social.treehouse.systems
                  wrote last edited by
                  #9

                  @cyberia @fasterthanlime IIRC this has been an accepted rfc for a long time and nobody has implemented it. Or maybe it was just about unions ?

                  yosh@toot.yosh.isY 1 Reply Last reply
                  0
                  • lizzy@social.vlhl.devL lizzy@social.vlhl.dev
                    @fasterthanlime redo cargo from scratch, it doesn't work for anyone except upstream developers and it is the reason for 95% of the hate that rust gets.
                    lizzy@social.vlhl.devL This user is from outside of this forum
                    lizzy@social.vlhl.devL This user is from outside of this forum
                    lizzy@social.vlhl.dev
                    wrote last edited by
                    #10
                    @fasterthanlime another problem is architecture support, which is mostly related to LLVM and not having multiple implementations, so I would fix that there is no proper spec and no alternative compiler.
                    1 Reply Last reply
                    0
                    • fasterthanlime@hachyderm.ioF fasterthanlime@hachyderm.io

                      I am NOT making a Rust replacement, but — if you could fix one* thing about Rust syntax/semantics/etc. what would you fix?

                      (*one per reply, multiple replies per household are allowed)

                      willhbr@ruby.socialW This user is from outside of this forum
                      willhbr@ruby.socialW This user is from outside of this forum
                      willhbr@ruby.social
                      wrote last edited by
                      #11

                      @fasterthanlime separate ownership semantics syntax from memory layout.

                      Box<> feels dirty because so much typing, but so much of the time you don't need stuff directly embedded

                      1 Reply Last reply
                      0
                      • fasterthanlime@hachyderm.ioF fasterthanlime@hachyderm.io

                        I am NOT making a Rust replacement, but — if you could fix one* thing about Rust syntax/semantics/etc. what would you fix?

                        (*one per reply, multiple replies per household are allowed)

                        khyperia@mas.toK This user is from outside of this forum
                        khyperia@mas.toK This user is from outside of this forum
                        khyperia@mas.to
                        wrote last edited by
                        #12

                        @fasterthanlime a higher priority on editor experience when considering language designs

                        (sorry that’s not exactly what you asked, haha - my point being that a programming language is not its spec, it’s also everything that surrounds it, and the spec should be guided by that. IMO, early on, rust focused too much on compiler-in-a-terminal experience and not enough on compiler-in-a-editor. getting better though!)

                        fasterthanlime@hachyderm.ioF 1 Reply Last reply
                        0
                        • fasterthanlime@hachyderm.ioF fasterthanlime@hachyderm.io

                          I am NOT making a Rust replacement, but — if you could fix one* thing about Rust syntax/semantics/etc. what would you fix?

                          (*one per reply, multiple replies per household are allowed)

                          chebra@mstdn.ioC This user is from outside of this forum
                          chebra@mstdn.ioC This user is from outside of this forum
                          chebra@mstdn.io
                          wrote last edited by
                          #13

                          @fasterthanlime Redeclaring a variable of the same name should be an error.

                          aru@hachyderm.ioA chosunone@pleroma.chosunone.ioC 2 Replies Last reply
                          0
                          • khyperia@mas.toK khyperia@mas.to

                            @fasterthanlime a higher priority on editor experience when considering language designs

                            (sorry that’s not exactly what you asked, haha - my point being that a programming language is not its spec, it’s also everything that surrounds it, and the spec should be guided by that. IMO, early on, rust focused too much on compiler-in-a-terminal experience and not enough on compiler-in-a-editor. getting better though!)

                            fasterthanlime@hachyderm.ioF This user is from outside of this forum
                            fasterthanlime@hachyderm.ioF This user is from outside of this forum
                            fasterthanlime@hachyderm.io
                            wrote last edited by
                            #14

                            @khyperia no that's valid

                            1 Reply Last reply
                            0
                            • lizzy@social.vlhl.devL lizzy@social.vlhl.dev
                              @fasterthanlime redo cargo from scratch, it doesn't work for anyone except upstream developers and it is the reason for 95% of the hate that rust gets.
                              fasterthanlime@hachyderm.ioF This user is from outside of this forum
                              fasterthanlime@hachyderm.ioF This user is from outside of this forum
                              fasterthanlime@hachyderm.io
                              wrote last edited by
                              #15

                              @lizzy what properties would the remake have?

                              lizzy@social.vlhl.devL 1 Reply Last reply
                              0
                              • fasterthanlime@hachyderm.ioF fasterthanlime@hachyderm.io

                                I am NOT making a Rust replacement, but — if you could fix one* thing about Rust syntax/semantics/etc. what would you fix?

                                (*one per reply, multiple replies per household are allowed)

                                d2718@hachyderm.ioD This user is from outside of this forum
                                d2718@hachyderm.ioD This user is from outside of this forum
                                d2718@hachyderm.io
                                wrote last edited by
                                #16

                                @fasterthanlime

                                Relax the restrictions for making traits object-safe (or dyn compatible or whatever). I'm sure there are underlying technical limitations in play, but it'd be nice to have the (easy) option of saying, "Hey, I'm willing to accept some overhead in exchange for some convenience here."

                                1 Reply Last reply
                                0
                                • poliorcetics@social.treehouse.systemsP poliorcetics@social.treehouse.systems

                                  @cyberia @fasterthanlime IIRC this has been an accepted rfc for a long time and nobody has implemented it. Or maybe it was just about unions ?

                                  yosh@toot.yosh.isY This user is from outside of this forum
                                  yosh@toot.yosh.isY This user is from outside of this forum
                                  yosh@toot.yosh.is
                                  wrote last edited by
                                  #17

                                  @poliorcetics @cyberia @fasterthanlime

                                  Tuples are anonymous structs. To my knowledge anonymous enums have not been accepted; I agree they would be nice.

                                  poliorcetics@social.treehouse.systemsP simon@tutut.delire.partyS 2 Replies Last reply
                                  0
                                  • fasterthanlime@hachyderm.ioF fasterthanlime@hachyderm.io

                                    I am NOT making a Rust replacement, but — if you could fix one* thing about Rust syntax/semantics/etc. what would you fix?

                                    (*one per reply, multiple replies per household are allowed)

                                    yosh@toot.yosh.isY This user is from outside of this forum
                                    yosh@toot.yosh.isY This user is from outside of this forum
                                    yosh@toot.yosh.is
                                    wrote last edited by
                                    #18

                                    @fasterthanlime

                                    The things I would fix about Rust are the things I am working on hah.

                                    If I could wave a wand tho I'd probably use it to fix the Iterator and Future traits. Not because they are impossible to fix now, but doing that now will be incredibly tedious work.

                                    1 Reply Last reply
                                    0
                                    • fasterthanlime@hachyderm.ioF fasterthanlime@hachyderm.io

                                      I am NOT making a Rust replacement, but — if you could fix one* thing about Rust syntax/semantics/etc. what would you fix?

                                      (*one per reply, multiple replies per household are allowed)

                                      chosunone@pleroma.chosunone.ioC This user is from outside of this forum
                                      chosunone@pleroma.chosunone.ioC This user is from outside of this forum
                                      chosunone@pleroma.chosunone.io
                                      wrote last edited by
                                      #19
                                      @fasterthanlime Proper generator syntax
                                      1 Reply Last reply
                                      0
                                      • fasterthanlime@hachyderm.ioF fasterthanlime@hachyderm.io

                                        I am NOT making a Rust replacement, but — if you could fix one* thing about Rust syntax/semantics/etc. what would you fix?

                                        (*one per reply, multiple replies per household are allowed)

                                        chosunone@pleroma.chosunone.ioC This user is from outside of this forum
                                        chosunone@pleroma.chosunone.ioC This user is from outside of this forum
                                        chosunone@pleroma.chosunone.io
                                        wrote last edited by
                                        #20
                                        @fasterthanlime Marking fields as mutable on a struct, immutable by default
                                        fasterthanlime@hachyderm.ioF 1 Reply Last reply
                                        0
                                        • fasterthanlime@hachyderm.ioF fasterthanlime@hachyderm.io

                                          I am NOT making a Rust replacement, but — if you could fix one* thing about Rust syntax/semantics/etc. what would you fix?

                                          (*one per reply, multiple replies per household are allowed)

                                          tribaal@hachyderm.ioT This user is from outside of this forum
                                          tribaal@hachyderm.ioT This user is from outside of this forum
                                          tribaal@hachyderm.io
                                          wrote last edited by
                                          #21

                                          @fasterthanlime I think I’d just make tokio part of the standard and avoid the async function colouring problem. Then spend time on the compiler to be smart about the actually necessary async inclusion vs compiling to sync

                                          soc@chaos.socialS 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups