https://blog.phronemophobic.com/dewey-analysis.html is an absolutely delightful post quantifying Clojure usage.
Functions outnumber macros 20:1, the most popular single letter variable is x, and 63% of projects have zero mutable references!
miniblog.
Related Posts
It took me way too long to realise that Arc<Mutex<T>> is basically a way to create multiple &mut T references (with runtime constraints).
This means that you can use plain &T and &mut T in the vast majority of your code. Most code doesn't need to care there's a mutex.
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.
Is there any way of doing tagged references in safe Rust?
I've been looking at tagged pointers (the crate https://docs.rs/tagged-pointer/latest/tagged_pointer/ looks excellent) but it gives you back a raw pointer.
I'm not sure if you can create a safe wrapper for references using tagged pointers.