Mary Rose Cook's notebook

The public parts of my notebook.

My homepage.


John Carmack talking about functional programming

John Carmack's keynote at Quakecon 2013 part 4 - YouTube


I found this talk fascinating.


He talks about how to enforce purity. Only let game objects access the state of other objects by passing them a memory protected copy. That way, any attempts to cheat and mutate data are quashed.


He talks about changing state in a functionally pure environment. If one object wants to mutate another, it just passes it a message. It is up to the receiver to apply the message in the next tick.


#notebook