Jonathan. Frech’s WebBlog

Conceding to complexity (#284)

Jonathan Frech,

In learning natural languages at higher levels paralleled with learning about their rich histories interconnecting peoples across millennia, I came to realise how shallow programming languages truly are: in some sense, everything is C or em­bed­ded into a world resting on it. Quite pos­si­bly such is not to be sur­prised by in view of the immense limitations an encased die cannot cir­cum­vent in our real world: com­put­ing is all done in structures borne by in­for­ma­tion state, discrete and con­cep­tu­al­ly re­strict­ed as they are.

Pos­si­bly in growing up, I grew dull to the glamour: isomorphic notation chit-chattering about same old, grand ab­strac­tion promises shattering at the coasts of implementability. What’s left after peeling off all rouge, all blush seems to me to be but one: complexity itself.
Unveiled it stares at me, nei­ther grinning nor sighing: unconcerned with oh so many human sightings, never able to con­tain it, engineering failures galore.

I had an ex­pe­ri­ence of late which shook me to the core when a linearily im­ple­ment­ed base64 decoder of mine in Haskell lead to a com­plete pro­gram crash due to memory exhaustion (on a system boasting 16 GiB RAM plus swap), most likely due to exorbitant thunk creation. Coupled with awfully obtuse dependency and test man­age­ment, I began feel­ing overburdened with the thought of writ­ing in this lovely and expressive tongue I held dear for so long.
While beautiful five lines long, shapen into systems on which the out­side world may press, complexity oozes out of every nook.

Appreciating the intrinsic nature of complexity, it evermore bothered me the last cou­ple of months what I wrote in #250. a) Its claim is factually wrong: due to the subtleties involving the in­ter­play of interface satisfaction depending on­ly on a meth­od’s name, removed from its provenance, yet non-exporting fully isolating a name, im­ple­ment­ing pack­age-bound sum types is supported in con­tem­po­rary Go: sumtype.tar
b) Of even great­er concern, how­ev­er, is its subliminal stance valuing fea­ture im­ple­men­ta­tion as a meaningful action to overcome felt shortcomings. Here of particular relevance is the com­ment that recursive ADT definitions are not implementable with­out indirection (as infinite types exceed any fi­nite bit rep­re­sent­ation), excerting con­cep­tu­al pressure on the value classification (meaning non-pointer syntax in a recursive setting would have to ei­ther be forbidden or im­ple­ment­ed differently to how it looks on the page). It is oh so easy to get blinded by supposed features that amount to little as rewritings, serving as distractions from the tiny specks of complexity one is seldom lucky enough to woolily make out.

Hitherto exactly one tool has been found to con­tain complexity: ruthless adherence to simplicity. One shouldn’t give it up in exchange for but shinier polish.