Comment

Comment by magicalhippo

I've only briefly looked at Rust. How would you handle your Drawable if it needs to store some extra data?

Few of the things I use inheritance or composition for can be implemented without storing some extra data.

As an example, say a buffered Stream, that takes a Stream instance and adds buffered access. This BufferedStream would need to store the buffer data somewhere.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton