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

  • #21
    Originally posted by johanb View Post
    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.
    Rocket's creator is keen on using every unstable language feature he can get his hands on. Which, in a way, is a good thing, because if no one were to do this, then there'd be no one to give any feedback and live demonstrations of those features in practice. There will always be unstable features, and libraries which use those unstable features, no matter how mature the language is. Yet the general consensus in the community is to stick with stable when releasing a library, especially if that library is marked as stable (v1.0+).

    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.
    There are plenty of other similar libraries that don't require a nightly version of Rust. Gotham, for example, is a good alternative to Rocket. It even says it right on the front page:

    Originally posted by gotham.rs
    Stability Focused Gotham targets stable Rust. This will never change.
    Gotham is also automatically tested against Rust beta and nightly.

    Comment


    • #22
      Originally posted by GunpowaderGuy View Post

      - 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
      I don't see how your comment is a response to what you quoted, so I can only treat that non sequitur as an attempt to change the subject and I'm not interested enough to follow along as you do so.

      Comment


      • #23
        Originally posted by GunpowaderGuy View Post

        - 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
        I took a quick look at zig over lunch and it looks like it's significantly less powerful than Fomega. It's difficult to tell because the compiler crashes when I test interesting computations over types (granted I was only able to compile 0.1.1, I'll get master working when I can spare some free time to fight llvm).

        The term "first class types" is used on the website but it's not clear to me what this means because as far as I can tell there's a clear phase distinction and reduction doesn't appear to be possible on terms with free variables. Having not yet properly investigated it's unclear what affordances are offered over templates, it's also less powerful than macros (which as ssokolov noted, solve a different problem). Do you know if there's a prototypical example of what can't be done with templates?

        I hope I've not come off as argumentative as I'm genuinely curious to know more about zig and hear your thoughts as I'm unfortunately short on time recently.

        Comment

        Working...
        X