this post was submitted on 29 Aug 2024
139 points (90.6% liked)

Linux

7801 readers
145 users here now

Welcome to c/linux!

Welcome to our thriving Linux community! Whether you're a seasoned Linux enthusiast or just starting your journey, we're excited to have you here. Explore, learn, and collaborate with like-minded individuals who share a passion for open-source software and the endless possibilities it offers. Together, let's dive into the world of Linux and embrace the power of freedom, customization, and innovation. Enjoy your stay and feel free to join the vibrant discussions that await you!

Rules:

  1. Stay on topic: Posts and discussions should be related to Linux, open source software, and related technologies.

  2. Be respectful: Treat fellow community members with respect and courtesy.

  3. Quality over quantity: Share informative and thought-provoking content.

  4. No spam or self-promotion: Avoid excessive self-promotion or spamming.

  5. No NSFW adult content

  6. Follow general lemmy guidelines.

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] gedhrel@lemmy.world 3 points 2 weeks ago (1 children)

There are some situations where I can see Rust's type-ststem potentially being counterproductive. For instance, it may be valid to invert lock order in a chain of operations under some circumstances, and rust might prevent you from expressing that. I grew up with C (from the pre-ANSI days) and while lifetimes and ownership are things that good C devs care about, they are tacit - and the ability to play fast and loose when necessary is great.

The linux kernel is built on a foundation of these implicit semantics. Some of it is written down, some of it isn't. I can see why asking "but what does this mean?" can lead to frustrating conversations and overly-qualified answers, but not everyone in that video was hostile to the prospect.

[–] gianni@lemmy.ca 0 points 2 weeks ago (1 children)

Is that not what unsafe is for?

[–] gedhrel@lemmy.world 2 points 2 weeks ago

It's what C is for, too.

The point is that there may be cases already where the type system that rust provides its guarantees off the back of is insufficiently expressive. (I say "may be" because there are ingenious qays to use what it does provide, although nonobvious and not necessarily without cost.) If you're using unsafe then it's just an uglier C. I don't think anyone considers the current state of Rust's type system to be the be-all and end-all of expressivity.