O'Reilly logo
  • John Hall thinks this is interesting:

Sometimes you can assign each thing in the system a number and pass around the numbers instead of references.


Cover of Programming Rust


A framework for things like MVC pattern might be interesting. For example use a structured hash ID and save all framework objects in a hash map. Objects can share their hash and be passed messages . This works because you can declare a constraint that the storage object has ownership and can reach all the other objects by an identifier. Messages could be function calls or be passed by passing ownership from an object a broker then to the receiving object. But now we have a problem. What gets garbage collected? What happens when You can quickly circumvent frugal memory management by creating structures that retain values for the lifetime of the executable.