Announcement

Collapse
No announcement yet.

Rust Gets A 2018 Roadmap, Big "Productivity" Edition Planned This Year

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

  • #11
    Originally posted by mmstick View Post

    Compile-time executions & pi types won't make any existing features redundant. They solve different problems.
    ctfe can be used to build a borrow checker as a library ( https://medium.com/@bhuztez/emulate-...g-db4b5e94449f ); first class types can make generics redundant ( as explained in the zig programing language website ) , if my understanding is correct , both features coupled with first class modules can be used to emulate traits / classes ; and they also reduce the need for macros , directly ( again , as in zig ) , and indirectly ( no traits means no custom derive )

    Edit : almost forgot , cfte can also be used as a replacement for link time optimization , which cretonne is going to lack
    Last edited by GunpowaderGuy; 12 March 2018, 11:51 PM.

    Comment


    • #12
      Looks like there will be some breaking changes. They mention opt-in editions, to use new features one must add edition="2018" to cargo.toml

      Comment


      • #13
        Originally posted by uid313 View Post
        Technically it seems like an amazing language with the things it offers, like it offers safety and security.
        But as a developer, it looks really tricky to use and with an awkward syntax reminiscent of Ruby, yuck.
        It's not C-Style syntax but I would be loathe to call it awkward, anyone who knows a language using C-Style syntax can quite easily piece together what is going on in Rust code and it is no harder to write than C-Style syntax, we're not exactly talking Lisp here. it's a really easy transition.

        Now on the other hand learning to write correct code is a pain in the ass, and that's the biggest challenge Rust gives you.

        Idiots who think that OOP is about class hierarchies will have to wake up to the fact that no that's not what it means (it means modelling your programs around real world objects and concepts, rather than focusing on the procedures), and everyone and their mother is using Interface-Based-Polymorphism nowadays instead, with traits being a vastly more powerful version of the interface concept... but again that's about learning to write correct code.

        Comment


        • #14
          I had a mini-project a few weeks ago to write a very basic webapp for myself. I thought "hey, why not make it a bit more exciting and write it in Rust?" which I did and found worked very well. I looked at rest server libraries and found that Rocket was the only one that really fit my needs, it works really well and the APIs are clean and easy to use

          BUT

          I had to use rust-nightly to be able to use this library? rustup made it very easy to get rust nightly installed and I got it working within 5 minutes, but it still concerns me that a library needs the nightly version of the language to work. If a library is in such a desperate need of new language functionality that it requires the nightly version of the language it just doesn't seem like Rust is mature yet.

          I guess I made the mistake by assuming that Rust was somewhat mature due to it having a 1.0 release, but now I realize that the 1.0 release only means that it's stable rather than mature.

          Comment


          • #15
            Originally posted by johanb View Post
            I guess I made the mistake by assuming that Rust was somewhat mature due to it having a 1.0 release, but now I realize that the 1.0 release only means that it's stable rather than mature.
            My impression is that there are several aspects to that. One is that, while the language itself is fairly mature, the same is not yet true of the library ecosystem around it... there's work going on to filling the gaps, but there's a lot still to happen. A second is that a lot of the people building libraries are the kind of people who like to work on nightly, who like to take advantage of new language features that are in the pipeline... but by doing so, their work isn't accessible to those who just want to build on a stable platform. And that in turn is partly because some of those new features are actually kind of important building blocks... notably the async stuff...
            Last edited by Delgarde; 13 March 2018, 06:54 AM.

            Comment


            • #16
              Originally posted by ihatemichael
              What's wrong with the Ruby syntax?
              Do you also hate other things you don't understand?
              Do you not understand Michael?

              Comment


              • #17
                Originally posted by GunpowaderGuy View Post

                ctfe can be used to build a borrow checker as a library ( https://medium.com/@bhuztez/emulate-...g-db4b5e94449f ); first class types can make generics redundant ( as explained in the zig programing language website ) , if my understanding is correct , both features coupled with first class modules can be used to emulate traits / classes ; and they also reduce the need for macros , directly ( again , as in zig ) , and indirectly ( no traits means no custom derive )

                Edit : almost forgot , cfte can also be used as a replacement for link time optimization , which cretonne is going to lack
                C provides features which would allow me to reinvent function calls rather than using the built-in support. That doesn't mean I'd want to do it.

                Also, just because something can be used to reinvent something else doesn't mean they communicate the same semantic constraints to the optimizers.

                Comment


                • #18
                  Originally posted by Delgarde View Post

                  My impression is that there are several aspects to that. One is that, while the language itself is fairly mature, the same is not yet true of the library ecosystem around it... there's work going on to filling the gaps, but there's a lot still to happen. A second is that a lot of the people building libraries are the kind of people who like to work on nightly, who like to take advantage of new language features that are in the pipeline... but by doing so, their work isn't accessible to those who just want to build on a stable platform. And that in turn is partly because some of those new features are actually kind of important building blocks... notably the async stuff...
                  Also, Rocket is very noteworthy in that its author intentionally chose a "Here's what I want. I'm not compromising. Let other web frameworks aim for near-term stability." relationship with unstable language features.

                  Comment


                  • #19
                    Originally posted by GunpowaderGuy View Post

                    ctfe can be used to build a borrow checker as a library ( https://medium.com/@bhuztez/emulate-...g-db4b5e94449f ); first class types can make generics redundant ( as explained in the zig programing language website ) , if my understanding is correct , both features coupled with first class modules can be used to emulate traits / classes ; and they also reduce the need for macros , directly ( again , as in zig ) , and indirectly ( no traits means no custom derive )

                    Edit : almost forgot , cfte can also be used as a replacement for link time optimization , which cretonne is going to lack
                    I'm unfamiliar with zig and not able to have a detailed look at the moment so please take my remarks with a pinch of salt.

                    As ssokolov noted although Fomega is expressive enough to encode classes and the interesting bits of modules it's rather painful to work with directly. I had a cursory look at zig and it appears to be some basic compile time evaluation likely without a proper formalism underlying it (please excuse me if I'm mistaken, I'm unfortunately not able to look closely at the moment). Perhaps someone can try to get the typechecker to diverge (evaluation likely occurs with an upper limit on the allowable steps).

                    Regarding the remarks about Haskell. In my opinion Haskell's encoding of dependent types is right for the context but wrong in general (again basically an embellishment of Fomega). I've also always found it somewhat bizarre that no one brings up dml/ats which basically already solved this problem (including with the addition of linearity).

                    Comment


                    • #20
                      Originally posted by ssokolow View Post

                      C provides features which would allow me to reinvent function calls rather than using the built-in support. That doesn't mean I'd want to do it.

                      Also, just because something can be used to reinvent something else doesn't mean they communicate the same semantic constraints to the optimizers.
                      - The borrow checker library only has compile time cost , types as function parameters ( replacement of generics ) result in static dispatch so no performance loss there ( but mir may have to be modified to keep the benefit of pre monophormization optimizations ) , emulated traits would be like a transcompiler ( think c with classes ) , ( so again the problem would to keep the compile times quick ? )

                      -the first one is only currently worse because c++ wasnt designed for that kind of metaprogramming , first class types are more flexible and introduce new kinds of api safety yet they result in a less bloated language , i dont know if rust's syntaxis is up for the task of practically emulating traits/oop with metafunctions
                      Last edited by GunpowaderGuy; 13 March 2018, 11:18 PM.

                      Comment

                      Working...
                      X