Comment

Comment by Panzerschrek

> A trait must follow so-called object safety rules to be used as a trait object

This seems for me to be a major design flaw of Rust. It tries to repurpose traits for dynamic polymorphism, even if this doesn't fit perfectly. C++ is more honest, it has two separate mechanisms for static polymorphism (templates) and dynamic polymorphism (inheritance).

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton