Git is a purely functional data structure (2013)
A data structure cannot be functional. I understand what he&#x27;s trying to say, and agree with most of it, but the word &quot;functional&quot; is purely wrong. What he wants to say is &quot;good&quot;. But not all &quot;functional programming&quot; is good, nor is all good programming functional by necessity, despite what your local Lambda The Ultimate nerd tries to tell you.<p>The Best, when it comes to data structures is a Directed, Acyclic Graph. For instance your typical linux filesystem is a DAG. But there&#x27;s one problem with DAGs: When they reach a certain complexity human brains are not fit enough to parse them anymore. (programs still can though)<p>So in many circumstances at least a human programmer needs to take a look at the state of your program and make assumptions about its correctness, which is called debugging. And that&#x27;s why in Good programs we often use Good data structures instead of The Best.<p>Good data structures are key-&gt;value stores (which you may know as &quot;hash tables&quot; or &quot;dictionaries&quot;), trees, and trees in a simplified special form: lists, each of them being somewhat able to represent the other two, if one can accept a performance hit and&#x2F;or increased complexity in source code. Dictionaries, trees, lists. That&#x27;s it. And you do that in every programming language that is at least a little bit interested in being Good.<p>So there&#x27;s nothing special or functional about git&#x27;s data structures, it&#x27;s just normal Good programming, and a few programmers who are so good at programming that they don&#x27;t even need to mention it anymore, they breath good programms.<p>Then of course to the normal bread-earning coder good programs are a rare sight. But the reason is not that they are really rare, the reason is that successful business doesn&#x27;t really require Good programs to succeed. Mediocre programs are good enough to earn their rent, and most of us spend most of our coding hours to earn our rent.<p>All that being said, if you don&#x27;t just want to make money, go and spend some time studying git internals. It will teach you a lot more than most of your teachers&#x2F;professors taught you combined. Sadly the source code is written by Linux gurus, who like to encrypt their source code with a very special key that only people from their tribe can understand. But the Git Book is actually good enough that you can study quite a lot of the internals from that book. I also suggest writing your own git in your favorite programming language once, to really understand it.