this post was submitted on 01 Feb 2026
15 points (94.1% liked)

Rust Programming

9117 readers
30 users here now

founded 6 years ago
MODERATORS
 
top 3 comments
sorted by: hot top controversial new old
[โ€“] goedelchen@mastodontech.de 1 points 8 hours ago

@Ephera that feels wrong, somehow ...

You can have the thing you are dereferencing to be a trait, so you can change your "base class" at runtime.

At least, you can't have multiple inheritance with impl Deref (I hope / as far as I can see)

[โ€“] nimpnin@sopuli.xyz 11 points 14 hours ago (1 children)

The lack of inheritance is my favorite feature in a programming language

[โ€“] Ephera@lemmy.ml 6 points 10 hours ago

I actually agree. This is my sneaky attempt at educating people about impl Deref. Although, I am still not sure how to feel about it, since I do actually see quite some similarities with inheritance...