using assignments – load and store instructions • (jump) control structures – if-then-else, loops, breaks, continue and return Von Neumann computer It has serious bottleneck – scaling. “One tends to conceptualize data structures word-by-word”
grow ended somewhere in 2005 • Moore's law now achieved by scaling out and not scaling up – Same speed, more cores • Demand for processing resources still grows • Software world not yet adapted – Hey, we still have COBOL
citizens • Immutability • Promote concurrency in space • FP is about going away from Von Neumann Model of calculations in Lambda Calculus direction • That means trying to describe what should be done (functions), and not how (instructions)
Closures • Map, reduce, zip, fatMap • Partial function application and currying • New collections – Parallel (made for map) – Generators, unlimited collections, etc • FRP - data fows and the propagation of change made on functions • Advanced Concurrency – STM – Futures – Atoms – Agents
JVM, CLR, JavaScript VMs, lisp dialect • Scala: java-like functional language, inter-operable with java, runs on JVM, supports imperative style as well • Java8: well, they became functional in new Java (functions are frst-class now, lambda expression, parallel collections) • C++ 11~14: lambdas (replace functors), there are immutable struct implemented on shared_ptr, std::bind, std::transform • JS: closures are used, currying is there, FRP can be done in javascript
efects • Concurrency • Programs are usually shorter and easier to read – 한국어도 읽기 쉽다 . 심각 . • Productivity vs Performance - hey, they were just selling OOP back then, it’s marketing!
distributed systems – hadoop, real-time processing, multi-threads programs • Big programs – in FP style there are usually 3x-10x less code • Basically, all the languages starting to to have functional features and mutate to have functional style • Most probably you will be using FP before you know it
model is von Neuman computer – kernels, drivers, controllers, etc • Rewriting huge systems that work and are scalable • When you have all your expertise in imperative world and scaling out is not needed • Complexity is not planned to be big – small single-threaded programs, scripts, no UI
Joel Spolsky blog, other blogs • Java8, C++11-14 release notes • Chris Richardson presentation on Functional Programming • Use functional programming techniques to write elegant JavaScript http://www.ibm.com/developerworks/library/wa-javascript/index.html • The Joy of Clojure book by Michael Fogus and Chris Houser • Clojure – the JFDI language – https://docs.google.com/presentation/d/15-7qFy6URdE7Owi2LitkQI_OHBu1AFWPUwHxgBc- O4E/edit#slide=id.p • Search internet about functional programming techniques in your language. It's out there.