The Philosophy Behind Functional Programming

The programming paradigm we have always used was Imperative Programming. A series of commands to the computer – do this, do this, and do this. This was enhanced in the Nineties with Object-Oriented Programming (OOP) where software objects were created, with their own internal programming and memory – little minicomputers of their own.

These communicated by sending messages to other objects – including the operating system (such as Microsoft’s Windows) that ran the machine they were on. Large libraries became available (such as Microsoft’s .NET) – that all the little objects could use.

The hardware all this was running also was simplified by the use of Chips (large-scale integrated circuits) that communicated over a data buss and an address buss. Messages were flying back and forth everywhere – and the situation became confusing, because some of these little pieces changed, without the other pieces knowing it.

Keeping everything sorted out became a huge nightmare that doomed many companies. If they fixed one piece of their code – something else broke down.

The solution was simple – all the little pieces had to keep functioning the same way. Mathematically, they had to perform functions, operations that never changed (were immutable). The data could flow through them, from one function to another – and would emerge in the end, as the final result.

This is so different from the usual programming style, most programmers will not use it. They insist on doing things the old way – no matter what. I have worked with these guys (and gals) and I saw this with my own eyes. They want control over their code, to do with as they please – regardless of how this affects others.

I am learning F#, a language Microsoft supports. But to do this I needed a Windows 10 computer. A bought a cheap one, for $180, but it is now in the trash – as I await the shipment of a new one costing $220.

Here I am in rural Costa Rica – but with a new laptop and a fast Internet connection. I get videos every day – giving me the latest software news – some of which are crazy.

I have to discipline myself, to only pay attention to a few of them.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: