Transcendit's own web developer Paul Callaghan has recently had some articles published in Functional Programming: A PragPub Anthology. We had a chat with him to find out what this book is all about.
'I've been writing articles for PragPub magazine for a couple of years, based on stuff I used to teach at university' says Paul. 'PragPub is the in-house magazine linked to the Pragmatic Publishers, who publish many high-quality titles in the computing and programming arena, including several we use regularly at Transcendit.'
'One common theme in the magazine is functional programming, and the different styles, languages and technologies that are emerging. The editor, Michael Swaine, had the idea of pulling together the best pieces from recent years in book form as a useful resource for programmers. I've written three chapters in this book, which are the key pieces from my earlier articles.'
Functional programming is an alternative to the object orientated style of programming that is widely used by IT specialists today, including our own development team. There are many functional languages available, but all have common themes of programming at a higher level with rich data structures, often leading to simpler and more concise code that leaves bugs with fewer places to hide.
'One thing that's clear from this book is the wide range of approaches and techniques available under the umbrella of functional programming, and how people are starting to benefit from these tools.'
In Paul's chapters he discusses how to program in the "functional" style, using the cutting edge programming language Haskell for examples, before a brief look at more advanced features provided in Haskell. Other chapters in the book, contributed by noted authors in the field, cover related languages and how their features help to solve other interesting problems.
'I hope readers will get a feeling for the opportunities opening up in this area and the pros and cons of each, and maybe start adding functional ideas to their skill set. And hopefully, books like this will help open up wider discussion too about how to improve the technologies we use. It's an inspired move by Michael and the Pragmatic Publishers to put together this range of material in a single place.'
So is functional programming the future? Paul is a little bit biased here, but is quietly optimistic about how many people in the industry are starting to take notice and build big systems with these tools. 'Personally, I sometimes find mainstream code a little frustrating; you might have to read twenty lines of code to figure out what's happening, and read it carefully to check it's not doing anything obscure. But when you're working at a higher level you often can say what you mean clearly and precisely in a few lines.'
'Think of it like this; if I want to dig a hole, I don't want to do it with a teaspoon. I want a JCB. For some of the jobs that developers and other IT specialists do, tools like functional programming are a bit like JCB's. We want to encourage people to trade up from their teaspoons.'
Functional Programming: A PragPub Anthology is available now in paperback and ebook