In short, cgp-serde extends Serde’s original Serialize and Deserialize traits with CGP, making it possible to write overlapping or orphaned implementations of these traits and thus bypass the standard Rust coherence restrictions.
November 3, 2025 at 1:15 PM
In short, cgp-serde extends Serde’s original Serialize and Deserialize traits with CGP, making it possible to write overlapping or orphaned implementations of these traits and thus bypass the standard Rust coherence restrictions.
Through the extensible visitor pattern, you will see how to build a modular interpreter for a simple math expression language, complete with evaluation handlers that can be reused across different language versions.
July 10, 2025 at 1:53 PM
Through the extensible visitor pattern, you will see how to build a modular interpreter for a simple math expression language, complete with evaluation handlers that can be reused across different language versions.
This also enables safe enum upcasting and downcasting, as well as modular builder and visitor patterns in Rust. Check out the blog post to find out more!
July 7, 2025 at 2:00 PM
This also enables safe enum upcasting and downcasting, as well as modular builder and visitor patterns in Rust. Check out the blog post to find out more!
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....
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....
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.
May 3, 2025 at 8:31 PM
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.
This mainly improves use of CGP with idiomatic Rust code. Apparently, some readers pointed out about the aesthetic of getter methods returning &String instead of &str. This especially affects first impressions, when the hello world of CGP demonstrates the dependency injection of string fields.
March 23, 2025 at 4:45 PM
This mainly improves use of CGP with idiomatic Rust code. Apparently, some readers pointed out about the aesthetic of getter methods returning &String instead of &str. This especially affects first impressions, when the hello world of CGP demonstrates the dependency injection of string fields.
We are in the progress of writing a full blog post detailing all new features, as well as updating the CGP Patterns book to include the new features. Hopefully this will all be done in a few more weekends!
March 9, 2025 at 9:46 PM
We are in the progress of writing a full blog post detailing all new features, as well as updating the CGP Patterns book to include the new features. Hopefully this will all be done in a few more weekends!