Get the latest tech news
A C++ Mixin System
I've had this idea in the back of my head for a while of pervasively using mixins to add code and logic for more high level concepts, although this gets somewhat close to Rust style traits (and C++ concepts). This has existed in the back of my head for a long time as a way to model a framework or standard library implementaiton while also providing it for user types.
This has existed in the back of my head for a long time as a way to model a framework or standard library implementaiton while also providing it for user types. Errors are signified through a Result<> or Option<> like class, and both can handle reference like payload -- instead of exceptions, you can abort threads or the entire program. It explicitly annotates at the class level (which is like, the opposite of mixins normally): this means you could add the appropriate static_asserts that some type implements an interface.
Or read this on Hacker News