4 ms·
Git is a purely functional data structure, except for the mutating head pointers, rewriting of tags, various state in the repo related to things like on-going r
by kazinator 9y ago
Git is a purely functional data structure, except for the mutating head pointers, rewriting of tags, various state in the repo related to things like on-going rebases, cherry picks, bisects, ... oh and the index which is one object changing in-place (not to mention working tree, of course).
- vickychijwani 9y agoWhile what you say is technically accurate, I think you're missing the bigger picture here. The author's point still stands: git's commit history (arguably the most important part of a version-control system) can be viewed as a purely-functional data structure, and that view has practical benefits too. I tried to explain more here: https://news.ycombinator.com/item?id=15892013 https://news.ycombinator.com/item?id=15892013
- deleted 9y ago[deleted]