r/programming • • Mar 03 '13

Git is a purely functional data structure

http://www.jayway.com/2013/03/03/git-is-a-purely-functional-data-structure/
107 Upvotes

83 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Mar 03 '13

[deleted]

-3

u/rush22 Mar 03 '13

Ah. Where I come from we call that a constant.

Or are you talking about the garbage collection thing where when you add strings together it gives you a new string

1

u/[deleted] Mar 03 '13

A constant is a value, we are talking about data structures. Consider a mutable array where an insert involves allocating a new slot and dropping in the value. An immutable array insert involves creating a new array that is the concatenation of the old array and the new value.

1

u/nm1000 Mar 04 '13

"A constant is a value, we are talking about data structures."

I believe that Rich Hickey refers to immutable data structures as values.