this post was submitted on 31 Mar 2025
557 points (96.2% liked)

linuxmemes

24211 readers
1575 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
  • Don't get baited into back-and-forth insults. We are not animals.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
  • 5. πŸ‡¬πŸ‡§ Language/язык/Sprache
  • This is primarily an English-speaking community. πŸ‡¬πŸ‡§πŸ‡¦πŸ‡ΊπŸ‡ΊπŸ‡Έ
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
  • 6. (NEW!) Regarding public figuresWe all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.
  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.
  • Β 

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.

    founded 2 years ago
    MODERATORS
     
    you are viewing a single comment's thread
    view the rest of the comments
    [–] [email protected] 100 points 3 days ago (15 children)

    Actual answer:

    Rust is a relatively new programming language. Similar to C or C++ it compiles directly into executable binary code so it can be used for bare metal or low level operating system programming. It is thus relevant to Linux kernel development as things like drivers can and are being developed in Rust.

    Compare this to the likes of Java or C# which get compiled to bytecode or a kind of pseudo machine code that gets run in a virtual machine, which has advantages for application development, or something like Python which is interpreted (or just-in-time compiled) at run-time, useful as an end user scripting language.

    Rust is designed from the ground up to tackle some modern problems, a key one being memory safety. It's a lot more paranoid about memory allocation and access and it's structured around this. Older languages like C allow the programmer a lot more absolute control over the hardware, which effectively means the C programmer has a lot more footguns in his toolbox. Theoretically, Rust offers fewer opportunities for the developer to shoot himself in the foot.

    Rust also comes with some really cool tooling. Compiler errors usually point straight at the problem and say something like "Shouldn't there be a colon here?" The build system, called Cargo, is really slick in a lot of ways, handling linking, compiling, even library package management in a very automatic fashion. It's real slick to work with.

    As with anything, fans of the language can be a bit much; they stereotypically suggest rewriting everything under the sun in Rust whether it makes sense or not, and this includes the Linux kernel, which has caused some friction in the community; Linux contributors are often very accustomed to C and some don't want to deal with anything else.

    [–] [email protected] 12 points 3 days ago (10 children)

    I like the description by a Finn who said: Rust is like a car with automatic, while in C (or Zig) you need to change the gears. In Rust you literally follow the compiler, which allows many young developers to program at low level, while C demands more time to avoid bugs. It is up to each person what he/she prefers. I would prefer to control myself the stuff and learn the in and outs of memory management.

    [–] [email protected] 1 points 1 day ago (1 children)

    I like the description by a Finn who said: Rust is like a car with automatic, while in C (or Zig) you need to change the gears.

    I don't think this metaphor is correct. The automatic gear's analogy would be the Garbage Collector, which almost every mainstream language has. Rust's memory management, in comparison, is still manual. Maybe not as manual as C or Zig - but I'd say about as manual as C++. The difference is not that it has some weird gear-changing (memory cleanup) scheme that does not require human intervention - it's that it yells at you when you don't do the regular gear changing (memory management) properly.

    [–] [email protected] 1 points 1 day ago

    I found the article, or better opinion. My bed that it wasn’t a Finn, but an America, Alan Ward. The metaphor is taken from him, while he explains in his article much better than me. Please, see his opinion on page 48-49 in the linked PDF of the current Full Circle issue #215 below:

    Full Circle #215

    I find his metaphor very apt.

    load more comments (8 replies)
    load more comments (12 replies)