• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

about functional programming book

 
Ranch Hand
Posts: 688
Mac
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ben
What is the difference between part 1 and part 2?
Does all examples are based on gradle or maven?
 
Author
Posts: 28
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jignesh!

What is the difference between part 1 and part 2?



Part 1 is about the functional basics that build the foundation for the rest of the book:

  • Chapter 1 - Introduction to FP: History of lambda calculus (don't worry, no extended Math needed in the book) and introduction of various functional concepts in a language-agnostic way
  • Chapter 2 - Functional Java: How does Java implement Lambdas, how do they work and differ from anonymous classes, how method references make things easier, how do the concepts from chapter 1 fit into Java
  • Chapter 3 - Functional Interfaces of the JDK: Exploring the java.util.function package to learn about the "big four" functional interface categories that will build the foundation of most code. Also, how to compose these interfaces and how to bridge the gap if a certain type is missing.


  • The second part of the book is topic-based around the FP concepts in the first part, plus additional chapters for a more Java-specific look at certain features.

    For example, chapter 4 is "Immutability", followed up by "Working with Records", as Java's new (shallowly) immutable data aggregation type.

    Chapter 6 is about "Data processing with Streams", followed up by "Working with Streams" to discuss things like "how to deal with primitives" or looking at downstream Collectors in more detail.
    The next one is "Parallel Data Processing with Streams" which talks about when, how, and when not to use parallel Streams.

    The link in my signature lists the table of contents.

    Does all examples are based on gradle or maven?



    The examples are neither Gradle nor Maven.

    Many of them are only a few lines long or even won't compile at all!
    The point of the non-working one's is to illustrate a problem or a limitation you run into before showing you how to overcome it.
    That's why I didn't think the classical "full project setup" would make sense, as the boilerplate needed around the examples would be much larger than the code itself.

    Only for things that  won't work in JShell, standalone interfaces or classes, or things that require multiple classes, I've created the code necessary to run it without JShell, either by using java/javac, or in the case of chapter 14 "Design Patterns", a Gradle project.

    As my book isn't a recipe-style one, I prefer JShell for running such small code blocks, to experiment with them instead of delivering copy&paste-ready solutions.

    You can check out the book's code repo to see how I've done the code examples.
     
    So you made a portal in time and started grabbing people. This tiny ad thinks that's rude:
    We need your help - Coderanch server fundraiser
    https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
    reply
      Bookmark Topic Watch Topic
    • New Topic