Getting to Know a Programming Language

Learning a new programming language is an interesting process - over time you start to see patterns in the similarities and differences between the new language and ones you have already studied.

I say studied because a programming language is an artifact that you can walk around, look at from different angles and admire. Usually, yes, you are learning the new language to achieve an end, but sometimes studying a programming language can be the point in and of itself.

When I want to get to know a new programming language there are a couple of guides I keep in mind. The first is from 7 Languages in 7 Weeks by Bruce Tate, and it takes a big picture, more ‘strategic’ view:

  • What is the typing model?
  • What is the programming model?
  • How will you interact with it?
  • What are the decision constructs and core data structures?
  • What are the core features that make the language unique?

The other is from an old blog post (~2012) by a computational social scientist named Ben Klemens called How to learn a new programming language. In it he suggested asking 18 questions that are more ‘tactical’ in nature:

  • How do I print “Hello world” to the screen?
  • How do I insert comments?
  • Where’s the documentation?
  • What are numbers like?
  • What are the lists like?
  • How do I declare a new variable?
  • How are references handled?
  • How do I handle strings of text?
  • What are the structs like?
  • How do I write and call a function? Are function arguments copied in or pointed to?
  • How do I debug a function?
  • What are the scoping rules?
  • How do I maintain continuity across function calls?
  • Can I do text substitutions (i.e., macros)?
  • How do I load libraries/packages so I don’t have to reinvent wheels?
  • How do I set up functions that act on a specific structure?
  • How do I get an auxiliary structure that builds upon a base structure?
  • How do I package my own stuff?

Taken together these questions (23 in all) provide a useful framework for getting to know a programming language