Line-of-business application developers do not yet have the tools they need to take full advantage of the benefits of functional programming.

Many languages have redundant features; progress in language design includes removing those features.
–Mark Seemann

Functional Programming is becoming more widely used in general purpose computing. For many of us this change involves the same kinds of mental gymnastics as when we moved from procedural to object oriented programming (poly-what-ism?), and from relational to document data models (but I almost reached fifth normal nirvana!).

Functional Spaghetti

In his post Less is more: language features Mark Seemann adeplty took aim at many sacred cows from Numbers to Inheritance to NULLs to Exceptions and even Interfaces.

But rather than advocating for any currently existing language Mark seems to be hinting that a better language might be possible (though he mentions OCaml, Haskell and F# in passing).

So if we follow Mark’s advice to its logical conclusion do we end up with the Turing Complete equivalent of the following possible operations?

  • Increment Program Counter
  • Decrement Program Counter
  • Update State Register

Of course not!

But it has been noted that while functional style programming languages may be great for mathematicians they do seem to resemble their lambda calculus roots a little too closely for your average business programmer.

What’s needed for business programmers is the modern COBOL or Visual Basic but which embodies the most critical aspects of functional programming in a form that favors readability over terseness. The popularity of those languages in their day should provide clues for those among us choosing programming languages for productive business application development.

So does that mean in this business programming language operators will look more like this?

  • AND Instead of &&&
  • OR Instead of |
  • AS Instead of :?>
  • LEFT SHIFT Instead of <<<
  • SELECT ... FROM ... WHERE...GROUP BY instead of Map/Filter/Reduce etc…
  • along with more familiar ways to express functional composition etc…

Or perhaps we can take this even further if we consider a Domain Specific Language where the domain is business programming. Something like Gherkin may a be a good example to start with. A programming language that makes it possible to write business readable code may also reduce the need for creating costly external DSLs.

As noted recently by a software craftsman:

Is Clean Code less Code? … I really don’t think so.
–Nina Hartmann

Sometimes more really is more!