User Tools

Site Tools


Sidebar

Dave Orme muses about agile and functional programming.

My current work emphasizes SOA applications using Scala, Kubernetes, and AWS with a React-based SPA front-end. I'm also interested in progressive web applications and developer tools.


Blog

Scala, Clojure, and FP

Agile

The Cloud

Data-First Development

Older work

Coconut Palm Software home


Donate Bitcoin:

1Ecnr9vtkC8b9FvmQjQaJ9ZsHB127UzVD6

Keywords:

Kubernetes, Docker, Streaming Data, Spark, Scala, Clojure, OSGi, Karaf, GCP, AWS, SQL

Disclaimer:

Everything I say here is my own opinion and not necessarily that of my employer.

fp:home

This is an old revision of the document!


Functional Programming

Why Functional Programming (FP)?

I do not oppose object oriented programming (and think that OO can coexist nicely with FP), rather, I believe that a style of programming that embraces the advantages of both OO and FP can realize significant benefits. For example:

  • Easier tests with fewer fixtures and mocks, that refactor cleanly with the production code
  • More natural parallelism.
    • Using a functional architecture, often parallelism can be added automatically as a feature of the library, without requiring synchronization or locking.
    • With multiple cores being standard equipment on today's computers, having natural parallelism that you just switch on is a huge advantage.

Put quite simply, a functional style of programming can be achieved in any programming language, from Java to Scala–yet it is not the usual style that is practiced.

In this space, I'll document my explorations into functional programming. Most of the code here will be in either Java or Scala, though currently I'm using Java most of the time.

In addition, the “Monad” design pattern is a significant pattern in functional code. An ongoing theme is an attempt to demystify what a Monad is, where every experienced programmer has already used monads (often without realizing it), and why this is useful.

More on this

fp/home.1414253637.txt.gz · Last modified: 2014/10/25 12:13 by djo