Intro to Functional - raisercostin/software-wiki GitHub Wiki
Functional programming teaches some very important development sessions. In top:
- lazy evaluation - deffer computation till the moment is not needed anymore (see iterators, filtering collections, lazy val, functions to compute things, Provider/Supplier/Memoization like objects)
- immutable data
- vavr pattern for changing collections (by using AtomicReference)
- no need to make protection copies to pass them around
- iterators on old data that work
- control structures replacements
- try...catch replaced with Try data structure
- loops for/while/repeat/until with Monads
- synchronous calls replaced with Future and async/await semantics
- removal of non objectual primitives
- Option, Rich pattern
Huge Coding Improvements (the Big Lessons)
- Basic -> C/C++/Pascal (code & parameters reuse, procedural control structures)
- C++ -> STL (standard library usage, reuse through libraries)
- C++ -> Java (automatic memory management & no pointer arithmetic & OS independence)
- Java -> Spring Framework (adding Dependency Injection)
- Java -> Scala (get rid of loops and exceptions)
- functional immutable collections (www.vavr.io, old javaslang.io)/ Streams from java8 standard libraries
- lambda expressions (Java8)
- types for: exceptions, options(java's Optional)