As a kid there were certain words that I grew to distrust, recognising that they were a marker for dishonest communication. For a few years, I fanatically expunged these from my vocabulary, which I confess was quite an enjoyable experiment. At least it was until I realised that I was in danger of developing a rather limited vocabulary with entirely private nuances. So I retreated from my linguistic extremism and I salved my conscience with the thought that an inherent and fundamental part of communication was about merging these private meanings. OK, so I grew up. Mostly.
Despite following a lot of the analysis of the UK General Election 2015 results, I didn’t feel that I had the view I wanted. Sure, I thought the geographical posterised view of seats won in the UK (shown below) was very good at showing the regionalisation of the outcome. But I couldn’t answer for myself simple questions such as the size of the overall gain of Conservatives vs Labour; it was clear that the Liberal Democrat vote had collapsed but where did the seats ‘go’?
Ginger is designed to make programming with immutable objects the natural default rather than the exception. For example, the literal syntax for strings and the constructor syntax for vectors, linked lists, maps all create immutable objects. If the programmer wants mutable versions of these, they must make that choice explicit, without the convenience of syntactic sugar. Another more subtle example is that local variable definitions are constant (a.k.a. final ) by default, which means that closures over those variables are immutable too. Continue reading In Praise of Immutable Objects
I chose the title in reference to a charming story by Stansiław Lem, translated into English by an inspired Michael Kandel, called “Trurl’s Prescription”. The story opens with the following irresistible anthem to engineering; it was a favourite of my much missed, late friend Stefek Zaba. I write these posts with Stefek in mind – I hope they would have made him smile.
Not far from here, by a white sun, behind a green star, lived the Steelypips, illustrious, industrious, and they hadn’t a care: no spats in their vats, no rules, no schools, no gloom, no evil influence of the moon, no trouble from matter or antimatter—for they had a machine, a dream of a machine, with springs and gears and perfect in every respect. And they lived with it, and on it, and under it, and inside it, for it was all they had—first they saved up all their atoms, then they put them all together, and if one didn’t fit, why they chipped at it a bit, and everything was just fine. Each and every Steelypip has its own little socket and its own little plug, and each was completely on its own. They didn’t own the machine, neither did the machine own them, everybody just pitched in. Some were mechanics, others mechanicians, still others mechanists: but all were mechanically minded.