Rust can automatically rewrite functions to use out pointers instead of copying data! Neat.
miniblog.
Related Posts
Linux historically used magic numbers to recognise structs being used incorrectly with void pointers. These have been increasingly replaced with type-safe macros: https://lwn.net/SubscriberLink/915163/ba83480903b82cb8/
Some of the original files were unchanged from the 90s!
This article discusses how you often need #'foo rather than foo in Clojure code so you can redefine foo whilst testing your app interactively: https://srasu.srht.site/var-evaluation.html
Perhaps function pointers should evaluate to themselves? I wonder if there's a language solution here.
Smalltalk has a remarkable method named #become: that allows you to modify all pointers to a given object to point to a different object!
https://gbracha.blogspot.com/2009/07/miracle-of-become.html
This goes even further than updating instances when a class changes, it's changing instance references.