• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java 8 and functional programming

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft,

I've been reading in many places about the new functional programming features of Java 8. I don't fully understand what functional programming means. What's the difference between OOP and functional programming style? Can you please clarify this here? If It's not possible to explain it here, I would like to know if your book clarify this subject.

Thank you in advance.
 
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you know how OO programming differs from procedural programming? In functional programming, you can go to extremes and have no data in the program at all. Any information would be supplied via inputs and arguments.
 
Campbell Ritchie
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also have a look at Mike Thompson's post here.
 
Author
Posts: 26
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bruno,

We have a whole chapter dedicated to answer your question (chapter 11). You will find everything you need to know there.

In a nutshell, OOP and FP are not mutually exclusive. OOP is in general about abstracting over data (objects and state) whereas FP is about abstracting over behaviour (functions).

There are many common characteristics that FP languages have and encourage mostly based on the idea of mathematical functions. To give you a taster we made a quick video about what it means for Java: https://www.youtube.com/watch?v=Rd-sqHjmfB0
 
Bruno Sant Ana
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you guys for all replies.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic