Why should you learn an FP lang? Almost every programming language feature you love was invented in an FP lang decades before it became mainstream: - Garbage collection (lisp, 1950s) - Generics (ML, 1978) - Closures (scheme 1975) - Sum types and pattern matching (NPL 1970s)
Garbage collection became mainstream with Java in the 90s, 40 years after it was invented. Generics became mainstream as C++ templates in the 90s. Closures became mainstream in the 90s too with JavaScript
@zack_overflow This shilling of FP has never been stronger
@zack_overflow Interesting. Are these features truly mainstream if their underlying principles remain largely unappreciated?
(defun f(n)(round(let((x n))(+ -8644(* x(+ 19348033/840(* x(+ -11411191/480(* x(+ 18457847/1440(* x(+ -4609751/1152(* x(+ 269363/360(* x(+ -237719/2880(* x(+ 49871/10080(* x -143/1152))))))))))))))))))) (defun g(&optional(i 1))(let((v(f i)))(if(or(< v 32)(> v 126))""(concatenate'string(string(code-char v))(g(1+ i)))))) (defun h()(format t "~a~%"(g))) (h)
@zack_overflow Wait… original lisp didn't had closures ? I thought the homoiconithingy made it trivial. Even tho variable scope in lisp is a mess.
@zack_overflow honestly the pattern matching thing blew my mind when I first discovered it in rust. like why did it take so long for mainstream langs to adopt this? feels like we're always 20 years behind the real innovations happening in academic circles
@zack_overflow tá vendo @gustavodiasag eu falei q valia a pena aprender uma lang fp
@zack_overflow so basically if I ever travel back in time it might be useful noted
@zack_overflow What FP lang would you suggest to tackle first, Haskell?
“We have tacitly abandoned certain public spaces to the most disordered and depraved among us because enforcing the law feels mean and makes us uncomfortable,” writes @katrosenfield.