Comment

Comment by imtringued

How are traits not intuitive?

All they do is guarantee that a type has methods A,B,C available.

What might be slightly confusing are trait bounds on generics. They are kind of like traits themselves but not exactly. They implicitly say "this generic parameter must make methods A, B, C available via Trait X".

parent imtringued 1 month ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton