Why are there so many posts about Rust?

Non-programmer here, just curious about the general interest in this language, that ensures posts about it are on the front page every day.

16 points | by instagraham 884 days ago

9 comments

  • PaulHoule 884 days ago
    Older programming languages like C have a memory model that isn't safe. If they receive too much data that data can overwrite some other data or code. If you're lucky it crashes, if you are not lucky, an attacker commanded your program what to do.

    Newer programming languages like Java have automated memory management. This is safe, but is a bit slower and a bit wasteful. You don't have control over how memory is laid out so this is awkward for systems programming.

    Rust has a model that is both manual and safe (at least if you don't use "unsafe" features.) It gets talked about on HN for a few reasons: (1) people want to believe in it, (2) it fulfills much of its promise, but (3) it's challenging to use so people are always writing blog posts about their struggles with it.

  • jjgreen 884 days ago
    A ruthless and humourless evangelism contingent which downvotes any criticism and upvotes any dull rewrite of `ls` in their dreadful language.
  • paulgb 884 days ago
    As a programmer, Rust reminds me of why I fell in love with programming originally.

    Among programming languages, there are informally two camps: the academic languages that try out interesting ideas but are tough to use for real things (like Haskell) and the pragmatic languages that get the job done but lag by years in incorporating the best ideas from programming language design (like Python). Rust finds a nice balance in between the two, by being unapologetically pragmatic, but incorporating more modern ideas.

  • mikewarot 883 days ago
    Older, less elegant programming languages like C have no memory model, you manually allocate and deallocate everything, and play with a lot of pointers. The syntax is designed to be as compact as possible, without regard to danger, because it was created in the days when programmer time was far less valuable than CPU time.

    Older, more elegant programming languages like Pascal also had you manually dealing with allocations, but were far more careful about pointers, and made it very easy to see when you were dealing with pointers instead of normal variables, by using a carrot ^ to denote indirection. This made it fairly safe for programmers to think about things, and make far fewer mistakes. Turbo Pascal upped the game by including a quite complete run time library, and by avoiding the mistake of null terminated strings that was made in C. Additionally, it reference counts strings and makes allocation automatic, so you can do things like delete the first character from a string, with no need to deal with pointers.

    Unfortunately, the lesson learned was that programmers can't be trusted with anything dangerous, instead of making it easy to see danger. This is why Rust exists, and is given so much praise, despite a better alternative having languished in the shadows for so long.

  • childintime 884 days ago
    This must be the least exciting response... because I suppose there are many like me, who have a bookmark where every post that mentions Rust is listed. Like this one.

    So the same reason you got quite a lot of responses is the same reason why many posts get voted on: they get eyeballs early on, so the HN algorithm promotes them to a wider audience.

    Besides that I assure you, there's lots of interesting and unique things happening in the Rust sphere, many of which don't make the front page.

  • speedgoose 884 days ago
    I think it's simply because we are very enthusiastic about the language.

    It used to be a lot of posts about Ruby 15 years ago, today it's Rust.

  • cratermoon 884 days ago
    Might have something to do with Amazon sponsoring it and wanting to take control of it. https://www.infoworld.com/article/3633002/the-future-of-rust...
  • the__alchemist 884 days ago
    For embedded and systems programming, its pros/cons balance is remarkably high. This is a narrow field, where the only capable languages and C, C++, ADA, and ZIG. (Correct me if I missed any). So, strong player in a narrow field, with gaining popularity.
    • jstx1 884 days ago
      My impresion is that a lot of the projects that come up aren't in the embedded or systems domain and end up being Rust for the sake of Rust whether it's the best tool for the job or not.
      • the__alchemist 884 days ago
        Rust is versatile, and works in other areas (eg front and backend web dev, or PC applications). I agree it's often not the right tool here.