Abhinav Rastogi
Smooth, should not hang, main thread unblocked
Remain responsive under stress or things going down
Easily-upgradeable in parts
maximize resources of single machine
distribute across cluster of cheap hardware
based on events which are monitored by zero or more observers
based on message-passing, directed to a recipient
Composition, pipelining,
higher-order-functions
Immutable data, first class functions,
tail call optimisation
These are language features!
mapping, reducing, pipelining,
recursing, currying
These are programming techniques!
parallelisation, lazy evaluation, determinism
These are advantages of FP!
Simple definitions:
Absence of side effects
Don’t rely on data outside the function.
Write declaratively, not imperatively
var arr = [1,2,3]
// non-functional
var i;
for(i=0; i<arr.length; i++) {
arr[i] = arr[i] + 1;
}
// functional
map(arr, function(item) {
return item += 1;
})
map
reduce
filter
zip
mergeAll