Rust language is too hard to learn and use, says user survey

24 points by code_chimp 6 years ago | 11 comments
  • saidajigumi 6 years ago
    Perhaps more relevant than this click-baity editorialization, the Rust 2018 Survey itself and HN thread from a few days ago:

    https://blog.rust-lang.org/2018/11/27/Rust-survey-2018.html

    https://news.ycombinator.com/item?id=18544213

    • rafaelvasco 6 years ago
      Well, it is very hard or near impossible to make a sofisticated language/compiler such as Rust and not expose quite a bit of that complexity to the programmer. I've been reading the 2018 docs and I agree to every deliberate decision they made. But they can be and mostly are a drag during development. But once one grows accostumed to it, it flows really well. The compiler forces you to be careful with your architecture and code decisions and thats really good; A problem is that, when you're reading code made by proficient rust coders and you're just getting started you most likely won't understand quite a bit of it. Which is not true for most other languages.
      • Junk_Collector 6 years ago
        While the article is a little sensationalist, I do agree with the point that the tangential tools needs work. The most frustrating part of working with Rust for me has been dealing with getting an IDE up and running to the point that I often just resort to Notepad++ and command line which switching to a different computer. If they had an out of the box IDE configuration that you could just install and go with little investment, I imagine it would go a long way toward adoption.

        Think of it like the popularity of Anaconda, which is a just a collection of pre-configured available python packages.

        • m3talsmith 6 years ago
          I find visual studio code the easiest to get up and running. It's just a crate (that arguably should be installed by the extension) and an extension. That said, it sounds like they know this needs to be improved.
        • dpc_pw 6 years ago
          That's an overly pessimistic interpretation of the survey. :D

          With soon to be released "Rust 2018 Edition", quite a bit of mechanism are even easier to use on day to day basis.

          I suspect that a lot of people that "can't get into Rust", are just bringing a baggage of OOP habits. I suspect it, because Rust (or rather struggles to structure my Rust code), were the main catalyst that made me fully realize why and how OOP is terrible and was causing my problems all along, even before Rust.

          In a language like Java you can get pretty far, producing a typical OOP mess: with object referencing each other at will, creating a total spaghetti (graph of objects), full of race conditions, terrible performance, objects not being freed for weird reasons, race conditions, unclear ownership semantics etc. You only hit a wall much later, when it's no longer possible to grow or even maintain your terrible, buggy codebase, that was supposed to be so pristine and great, because you followed all the OOP-best practices. But until that wall, you feel quite productive, designing your classes and class hierarchies, and feeling great about yourself.

          In Rust, compiler demands proof that your code makes sense and is well structured, with clear ownership relationship, lack of race conditions etc. Like any data-oriented paradigm, that is a death blow to a typical OOP approach. People start playing with `Rc<RefCell<T>>`s and then give up, and think it's Rust's fault. I've seen topics like that on r/rust and elsewhere, so it makes me belive it happens quite often.

          Just to be clear: I'm not saying that there are no other reasons that are going to make it a challenge to get into Rust. But IMO, OOP habits are single biggest mistake, and you must leave them at the door when approaching Rust.

          IMO, some data-centered development paradigms should be a common part of Rust introduction. A lot of people in the industry are clear that OOP is trash, but because of inertia it is still the dogmatic and popular way that common-developer things about designing software.

          More on the topic of why OOP is so bad, and what to do instead: https://dpc.pw/the-faster-you-unlearn-oop-the-better-for-you...

          • reidjs 6 years ago
            I’m probably not as good a programmer as you are, but isn’t using OOP great for making certain types of programs? Think about making a chess game or something.
            • dpc_pw 6 years ago
              GUI programming is used as an example every time someone is praising OOP. And it seems the only time where there is some merit behind using OOP.

              Chess game would be a good example of what to never do with OOP. If you start with `class Pawn inherits from Piece`, then you going to find yourself in deep shit, really fast. Low performance, high complexity. If you use an 8 by 8 array of integers that mark the pieces, than your code will be just bunch of simple algorithms, that can work really well and fast.

              It might be a good exercise: write simple chess engine in OOP vs data-centric style, and compare.

              • FreeFull 6 years ago
                Even better, a chess board has 64 squares, so you can use a single 64-bit integer to store, say, the position of all white pawns, and repeat this for all the kinds of pieces. Then, you have a compact and fast data representation for your chess engine.
          • jlund3 6 years ago
            With a comparison of how hard or how long it takes to become proficient with a language, this article is pretty meaningless. From anecdotes I've heard from others about Rust and my own (limited) experience with the language, I suspect they are on to something, but this article contributes nothing that convinces me that Rust is hard to learn.
            • m3talsmith 6 years ago
              When my friends ask me about rust I tell them it's hard as fuck, but worth it: better to set difficult expectations and have them conquer those, than the opposite happen and they give up thinking they are smart enough.