Teaching functional programming (to kids)

Functional Programming and Object Oriented Programming are paradigms sitting at opposite extremes of programming language spectrum, and thus, good to learn both for a well rounded education. OOP seems much more prevalent today and has advantages in modelling the world, whereas FP has strong benefits for parallel processing, but as exemplified by Lisp, is often relegated as exotic and hard.

Yet many years ago simple FP was taught to young kids. Sometimes I reflect on my programming proficiency, not so much today after so many years, but in my early teens in the 1980s how I seemed to grasp concepts like recursion so much easier than my peers. …And I think it was because soon after learning Basic as my first language, my second language was a Functional Language…

…no not Lisp (the godfather) but LOGO.

Only a few years ago I was surprised to learn that LOGO “was a an adaptation and dialect of Lisp”, and with this new insight, I retrospectively considered my early use of LOGO had a profound impact on how I learned to think about programming. I believe LOGO would make a great “first language”.

So, how to use/teach LOGO today (particular as a child’s first exposure to programming)? Terrapin Logo seemed to be the premiere one, so a year ago I purchased a copy, but I found it awkward, and its teaching material dry and not engaging. I’m trying to get hold of the Apple II Logo book that I learnt from to see if that confirms my ancient memory of how engaging it was. Having a hunt around today, I found this PDF book scan, where it is interesting to observe how soon after drawing a stick figure, it leaps into the topic of recursion, with two out of eight chapters teaching recursion. Also today, I just discovered turtleSpaces, a 3D LOGO which looks awesome from my first ten-minutes using it.


One of the greatest minds in pedagogy and computer science, Seymour Papert was behind Logo, and I think at one point even Alan Kay was involved in this. Original logo was designed around an actual turtle that children would control using the language to draw shapes and that would suck them right in :slight_smile:

I think there is quite a bit of Papert’s philosophy in how Jeremy approaches the teaching of deep learning. Papert has this concept of “Mathland” where he gave the example of how we think it’s natural for children to learn French by being immersed in the French language and culture but do not think the same when it comes to teaching Mathematics, even though, for a child, these are the same thing. I think fastai follows a similar philosophy by immersing the student into the world deep learning from the get go, instead of throwing maths and symbols at them for weeks.

Here is Papert, talking about Logo:

Alan Kay and Seymour Papert thought deeply about the problem of teaching kids and their talks are always a source of delight and wonder for me.

I think https://turtleacademy.com/ is a great website for having fun with LOGO programming language. I believe it’s all online, so very easy to get going already.

If you do have a preference for Lisp like languages, I think Racket is a very good candidate.

1 Like

Our school had one of the actual robotic turtle things, when I was in grade 3! I thought it was so cool :smiley: