Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Javaslang DevoxxBE 2016

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.

Javaslang DevoxxBE 2016

Avatar for Grzegorz Piwowarek

Grzegorz Piwowarek

November 08, 2016
Tweet

More Decks by Grzegorz Piwowarek

Other Decks in Programming

Transcript

  1. @pivovarit #Devoxx #javaslang Issues • Only 3 functional control structures

    • No memoization • No partial functions lifting • No tuples • Optional extends NOT Serializable/Iterable • Lack of Stream/Optional in APIs • “Type pollution” • list.stream().map(...).collect(Collectors.toList()) • ...
  2. @pivovarit #Devoxx #javaslang • Declared params • Mutable instance state

    • Mutable global state • Declared return value • Mutable instance state • Mutable global state • Mutable params • Exceptions Potential inputs Potential outputs
  3. @pivovarit #Devoxx #javaslang • Declared params • Mutable instance state

    • Mutable global state • Declared return value • Mutable instance state • Mutable global state • Mutable params • Exceptions Potential inputs Potential outputs
  4. @pivovarit #Devoxx #javaslang • Declared params • Mutable instance state

    • Mutable global state • Declared return value • Mutable instance state • Mutable global state • Mutable params • Exceptions Potential inputs Potential outputs
  5. @pivovarit #Devoxx #javaslang Functional programming is about writing pure functions,

    about removing hidden inputs and outputs as far as we can, so that as much of our code as possible just describes a relationship between inputs and outputs. http://blog.jenkster.com/2015/12/what-is-functional-programming.html