this post was submitted on 17 Dec 2025
179 points (98.4% liked)

Technology

77790 readers
2493 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related news or articles.
  3. Be excellent to each other!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, this includes using AI responses and summaries. To ask if your bot can be added please contact a mod.
  9. Check for duplicates before posting, duplicates may be removed
  10. Accounts 7 days and younger will have their posts automatically removed.

Approved Bots


founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] CandleTiger@programming.dev 7 points 1 day ago (1 children)

But if you are doing something advanced, down at the hardware level

This part is wrong. Otherwise yes correct.

The “unsafe” code in rust is allowed to access memory locations in ways that skip the compiler’s check and guarantee that that memory location has valid data. They programmer is on their own to ensure that.

Which as you say is just the normal state of affairs for all C code.

This is needed not because of hardware access but just because sometimes the proof that the access is safe is beyond what the compiler is able to represent.

[–] sem@piefed.blahaj.zone 1 points 21 hours ago (1 children)

Thank you for the correction, I'll edit my comment.

sometimes the proof that the access is

safe is bevond what the compiler is able to represent

Could you say a few more words about this? In what situations do you have to write 'unsafe-tagged' code blocks? Could this be changed by improvements to the compiler? Or is it necessitated by the type of task being done by the code?

[–] CandleTiger@programming.dev 2 points 15 hours ago

Check out the excellent tutorial # Learn Rust With Entirely Too Many Linked Lists especially chapters five and six. It has a lot more words, it’s entertaining, engaging, and informative.