From Programming Languages to Modern Foreign Languages and back again with Imperial Horizons

Hi, I’m Hamish, a first-year student in MEng Computing (Artificial Intelligence and Machine Learning). So far this year I’ve enjoyed discovering set theory in our discrete maths module and learning to build a processor in Computer Systems, while at the moment I’m relishing Kotlin. I particularly like honing my competitive programming skills through algorithmic problem solving, and outside of my degree I play water polo once a week.

One of my most eye-opening experiences in secondary school was learning foreign languages. Having limited experience of Spanish from primary school (merely memorisation of set phrases), I was amazed and delighted to uncover a world of well-defined grammar rules, enabling me to construct my own sentences and express myself.

I studied Spanish to GCSE and French to A Level, and so when, during my application to Imperial, I became aware of the Horizons programme (which offers free after-hours languages classes), I was immediately attracted to sign up.

When it comes to programming too, I’ve always enjoyed exploring languages; I’m rarely satisfied with one for more than a few months. The variety of paradigms in the Imperial Computing course (from OOP in Kotlin to FP with Haskell, through Scala to logic programming in Prolog) was also a factor in my decision to study here.

Yet, until recently, I’d never connected my interest in Modern Foreign Languages (MFL) and Programming Languages. In this blog, I want to draw some comparisons between the two, based on my studying Haskell and Korean Level 1 (Imperial Horizons) in this first term of Y1.

An obvious commonality is that Korean and Haskell are interesting because they are both quite different from the norm taught in schools. Being a functional programming language, Haskell is unlike the modern default imperative paradigm, while Asian languages are typically eschewed in favour of Germanic and Romance languages in the secondary school classroom. Experiencing something ‘exotic’ is an oft-cited reason to study a language, but I think what this reflects is merely a desire to “expand your brain,” as our Haskell lecturer says, and try to think about the world in a different way.

Fundamentally, language exists to express ideas clearly and concisely. Functional programming is renowned for terse yet clear programs, ideal for readability and maintainability. In a similar vein, the Korean alphabet (한글) was designed to be a coherent representation of the sounds of the language. Sound characters are formed of two to four letters glued together, so a short word can have many letter combinations: most words are one or two syllables. In Horizons we began with this alphabet. It’s interesting to note, however, that almost all programming languages use the Latin alphabet (ASCII), not their own. There is one exception that I know of, namely APL, whose variety of special characters express array operations.

Another similarity between Korean and Haskell is their concepts which are (almost) unrepresentable in other languages. Monads are a key feature of Haskell programming which imperative languages lack, while the 으 sound in Korean, often Romanised as “eu” has no real English parallel.

Moreover, a key programming philosophy, popular in Perl, is “there is more than one way to do it”. This also applies to Haskell, where we can program functionally, applicatively and/or monadically. In Korean, like in Japanese, it is common for women and men to express themselves differently, while Korean also has several ‘speech levels’ where verbs are conjugated according to who is being spoken to. Although in programming we only “talk” to the compiler, are we not really writing code for the person who will read and maintain it? Code can range from cryptic one-liners for single-use programs, to clearly-documented formal source in larger projects; this seems to reflect speech levels’ listener-oriented approach.

To conclude, MFL and Programming Languages have several similarities. Imperial has enabled me to delve into these two areas. I can’t wait to learn more programming and foreign languages, and I hope this post has given you a flavour of what Imperial offers students academically, both within and outside of DoC.

Leave a Reply

Your email address will not be published. Required fields are marked *