Blog Archives

Monads are hard because …

Here’s a nice quip from Luke Gorrie on Twitter: Monads are hard because there are so many bad monad tutorials getting in the way of finally finding Wadler’s nice paper. Here’s the paper by Philip Wadler that I expect Luke

Tagged with:
Posted in Software development

How to get started with functional programming

Someone asked me this weekend how to get started with functional programming. My answer: Start by writing pure functions in the programming language you’re currently using. The only input to a pure function is its argument list and the only

Tagged with:
Posted in Software development

You wanted a banana but you got a gorilla holding the banana

Joe Armstrong, creator of Erlang, on software reusability. I think the lack of reusability comes in object-oriented languages, not functional languages. Because the problem with object-oriented languages is they’ve got all this implicit environment that they carry around with them.

Tagged with: ,
Posted in Software development

Pure functions have side-effects

Functional programming emphasizes “pure” functions, functions that have no side effects. When you call a pure function, all you need to know is the return value of the function. You can be confident that calling a function doesn’t leave any

Tagged with: , ,
Posted in Python, Software development

85% functional language purity

James Hague offers this assessment of functional programming: My real position is this: 100% pure functional programing doesn’t work. Even 98% pure functional programming doesn’t work. But if the slider between functional purity and 1980s BASIC-style imperative messiness is kicked

Tagged with: ,
Posted in Software development

F# may succeed where others have failed

Philip Wadler wrote an article a decade ago entitled Why no one uses functional languages. He begins the article by explaining that yes, there have been a number of large successful projects developed in functional programming languages. But compared to

Tagged with: , ,
Posted in Software development

MIT replaces Scheme with Python

According to an article on The Snowtide Blog, MIT has decided to teach beginning CS classes in Python rather than Scheme. (Thanks to procoders.net for the link.) The article paraphrases remarks by Gerdald Sussman at the announcement.The main rationale was

Tagged with: , ,
Posted in Python, Software development

Functional in the small, OO in the large

The most recent episode of Software Engineering Radio is an interview with Luke Hoban, program manager for F#. The interview mentioned the idea of using functional programming in the small and object oriented programming in the large. In other words,

Tagged with: , ,
Posted in Software development

Functional programming in C++ with function objects

Here’s something I do all the time. I have a function of one variable and several parameters. I implement it as a function object in C++ so I can pass it on to code that does something with functions of

Tagged with: , ,
Posted in Math, Software development

Why functional programming hasn't taken off

Bjarne Stroustrup made a comment in an interview about functional programming. He said advocates of functional programming have been in charge of computer science departments for 30 years now, and yet functional programming has hardly been used outside academia. Maybe

Tagged with: ,
Posted in Software development