Skip to Content

What programming language should I learn first (as a maths student)?

c64

This post summarises my answer to a common question I get from mathematics students.

I’m not dogmatic about this; I recommend either R, Julia or Python depending on your project and specialisation. If you’re doing statistics, R is a no-brainer. For machine-learning heavy work, Python is still the standard. For more general numerical computing and simulation, for example Monte Carlo and MCMC (most of what I research day to day) I recommend Julia now because these things need to be fast. In the past I would have recommended C/C++ for simulations but I now believe Julia is more than good enough and much simpler to get going with.

I don’t believe which language you pick is initially is important for two reasons: all languages (especially the dynamically typed four: Python, R, MATLAB and Julia) work in very similar ways the only differences are the core types and the syntax. Secondly, you will inevitably have to use different languages as you progress in your studies or as you move between jobs. The important things to learn are the general concepts and ideas which are transferable. After than it’s just a matter of learning new syntax.