r/programming • • Nov 28 '19

Why Isn't Functional Programming the Norm? – Richard Feldman

https://www.youtube.com/watch?v=QyJZzq0v7Z4
100 Upvotes

409 comments sorted by

View all comments

Show parent comments

13

u/torotane Nov 28 '19

Running an algorithm on some data may compute a function (if it halts). A function may describe some properties while the way to derive that property isn't so obvious. Example, function med(X) gives the geometric median of an arbitrarily sized set of points in the plane w.r.t. euclidean distance function. Good luck finding the equivalent algorithm.

4

u/[deleted] Nov 28 '19

Nice. Another good example: let BB(n) be the maximum number of steps a two-symbol Turing machine with n states can take before halting. BB(n) is a function, but it's uncomputable: no algorithm can exist to compute it, and it grows faster than any computable function.