Skip to content

danutchindris/fp-in-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Modern Programming in Java

Table of Contents

Functional Programming in Java

Program Structure

Input data + Transformations + Output data = Algorithm

Imperative vs. Declarative Programming

  • imperative programming: we tell the computer what we want and how it should be done, step by step

    • there's a lot of room for errors
    • verbose
    • understanding the algorithm is more difficult because of its complexity
    • when reading the code we have to go back and forth (e.g. when reading a loop)
  • declarative programming: we tell the computer what we want but not how to do it

    • the algorithm resembles the problem statement
    • more concise
    • less room for errors
    • we understand what the algorithm does by reading it in one pass

Streams

  • a List is like a bucket - it holds data
    • a List is a data structure
  • a Stream is like a pipeline - it doesn't hold data, but it lets data flow through it
    • a Stream is not a data structure, it's an abstraction of the operations we apply to the data

Reactive Programming in Java

Coming soon...

About

Functional Programming in Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages