Side note: see for instance the ProtectMethod use of https://synopse.info/files/html/Synopse mORMot Framework SAD 1.18.html#TITLE_57 which is similar.
What I miss with records is inheritance.
Static inheritance, I mean, not virtual inheritance.
This is why I always like the `object` type, and find it weird that is deprecated and buggy since Delphi 2010...
Check https://blog.synopse.info/?post/2013/10/09/Good-old-object-is-not-to-be-deprecated-it-is-the-future almost seven years ago... already...
I tend to search for alternatives not in C++, where alternate memory models were added later on - as with Delphi.
But in new languages like Rust which has a new built-in memory model. Rust memory management is perhaps the most interesting/tricky/difficult/powerful/promising (pickup your own set) feature of this language.
Both C++ and Delphi suffer from the complexity of all their memory model. COW, TComponent, interface, variant, new/dispose, getmem/freemem, create/free... it may be confusing for newcomers. My guess is that 80% of Delphi RAD users seldom allocate manually memory (just for a few TStringList), and rely on the TComponent ownership and visual design.
At least they removed ARC from the landscape! 🙂
CMR is a nice addition - which FPC featured since some time, by the way...
We still need to check the performance impact of this initial release - writing efficient RTL was not the main point of Embarcadero these latest years. I hope it won't reduce regular record/class performance.