Post

It is now possible to do OOP-like inheritance at the type-level in #RustLang using #CGP! Our latest PR brings significant improvements to defining and using presets in CGP, with support for multiple-inheritance, and override mechanism to overcome the diamond inheritance problem.

Now before you start wondering or getting disgusted, the inheritance in CGP is quite different from the classical inheritance in the OOP world. CGP presets are more like type-level dictionaries of generic mixins. So in a way, preset inheritance is sort of like extending type-level lookup tables.

Also note that preset is an advanced concept in CGP that is yet to be formally introduced in our book. More updates will be coming very soon. But for now, you can check out the PR for a very high level overview of the changes: github.com/contextgener....

github.comPreset Macro Improvements by soareschen · Pull Request #91 · contextgeneric/cgpSummary This PR brings a number of improvements to the CGP Presets feature, and adds better support on OOP-like inheritance on presets. Inheritance Presets can now inherit from each other a short h...

0 reposts0 likes

No replies yet.