2024-11-15 π programmerhumor β RE: rustyfemboy
Is that because itβs that simple, or just that the boilerplate is pre-written in the standard library (or whatever itβs called in rust)?
Yes, it is that simple. In Rust if you have a structure Person and you want to allow testing equality between instances, you just add that bit of code before the struct definition as [β¦]
Derive macros are a godsend. Thereβs macros to automatically implement serialization as well. Basically a Trait that can automatically be implemented when derived
Itβs because people put in the hard work of writing amazing macros instead of baking code reuse into the type system itself π Iβm a rust noob and I love the derive macro.
ββββ
ββββ