By - Prakash Balodi
Software Engineer @ Quintype Inc.
Prakash Balodi
Complex software systems
Huge Codebases
Distributed systems (Architecture & Infrastructure)
Programming mostly with pure functions
Functions take data and return data
Higher order functions
Functions that are without side effects
Only return values, do not affect world
in any other way
For same input, output is also same (Referential Transparency)
int x= 10;
Math.sqrt(10); //Pure
new Random.nextInt() //Impure
Code is easier to debug,
Code can be lazy (or executed multiple times)
Function Calls can be Memoized.
Context for a function is small => easier to test
Person p = new Person(name: "Prakash", age:27);
println p.name // Prakash
foo(p);
bar(p);
println p.name // maybe Prakash?
Basically means that value of a variable cant be changed.
Enforces Functions to be simple (and testable)
Value signifies the meaning or worth of something.
Traditional programming assumes little difference between value and identity.
int x = 50;
// 50 is the value
//x is the identity.
Values don't have time associated with them, Identities do
int x = 50; //Value of x at time t1
x = x*2; //Value of x at time t2
x = 80; //Value of x at time t3
REPL is awesome!
Java Ecosystem (libs and Interop)
Beautiful Sequence API