this post was submitted on 10 Feb 2026
187 points (95.2% liked)
Programmer Humor
29635 readers
2143 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Deref is for smart pointers and not for inheritance.
The
windowscrate is full of Deref. Because the windows API is full of inheritance.It may not be what the trait was thought of for, but I'm glad we have it to interface with APIs that have actual inheritance.
Let me introduce you to this horror story: Deref Polymorphism https://rust-unofficial.github.io/patterns/anti_patterns/deref.html
Also sometimes newtypes