The Dongola Times

(Anachronistic) Dispatches from the Kingdom of Makuria.
16th of June, 2013

Wild Haskell Analogies #5: Cerebral Lateralisation

The most-important book published in this decade is The Master and his Emissary by Iain McGilchrist. We do not recognise its importance now, which is precisely why it is the most-important book of the decade. If we had recognised it, it would be less-relevant. But we have not listened to that prophet, so he is even more-important than he would have been otherwise. The book deals at such beautiful length with the consequences of brain lateralisation. This left-hemisphere-right-hemisphere stuff.

In the Haskell programming language, there are distinctly two modes of programming. The main one, as it is for our left-hemisphere World, is the pure mode. In the pure mode, no input or output may occur. Because once IO is done in Haskell, you no longer have purity. So Haskell proceeds like the godless of our times, who refer only to the achievements and capacities of humans to surmount their challenges. The problem with this is that you can only ever proceed linearly (hence the primacy of the linked list in Haskell). You cannot make an inspired decision, a decision of faith, such as “You shall find an element in the 10th position; you shall take it and hand it to the function,” unless you have random access, which can only be attained to with mysticism, input-output, faith, arrays. So precisely because Haskell is as precise and linear as the left-hemisphere that runs our World, it is the best way to express and solve problems for our World.

And, in Haskell, IO is like prayer. This is the only chance the program gets for spontaneity; for better or for worse. When IO happens, the program could crash, but it could also turn out an e-book. The things of creativity are not to be found anywhere in Haskell; the programmers thereof brag about how every single function does exactly the same thing every single time. Where does novelty come from, in Haskell? From the IO; from what the neo-Darwinian would call “mutation”. The program gets to a point, and needs to be told what to do, to adapt or terminate, and there is nothing under the Sun—nothing in the code—to which it may appeal. The highly-logical left-hemisphere experience is confused, because it cannot invent. So it prays and (hopefully) gets a response; this is input-output. Julian Jaynes, who was a prophet before McGilchrist, already stated that the right-hemisphere is the realm where input-output happens (or used to happen) in humans.