Upto: Table of Contents of full book "Internet of Things - a techie's viewpoint"

Programming languages for the IoT

Resources

Introduction

If you do a search for the best languages for the IoT, you will find lists that look like

What? that's the same list you get if you do a search for the most popular programming languages for anything! Is there nothing special about the IoT that asks for different languages to normal applications? Well, it depends on what bit of the IoT you are looking at. An Arduino or similar has about 4k of RAM. There is no way that it could possibly run a Java application. So let's be more realistic, and divide the IoT programming space into different sectors

Low memory

Microcontrollers such as the Arduino have so little memory that there is a severe restriction on the languages that can be used. Languages that compile down to the metal are most appropriate here, especially if they carry a minimal support environment. Assembler, C and C++ are the primary candidates, but it does need to be noted that these will generally not include even the standard libraries as they require too much memory.

While you might not expect to find interpreted languages used, there is a surprising exception: Basic is the language of choice for PIC controllers, and there is an open book PIC Microcontrollers - Programming in Basic by Milan Verle dedicated to this topic.

There are other options too at that level. Forth is a rather weird language (that I am rather fond of), but it only requires about 8k of RAM to support an interpreter. Remember: the early PCs had tiny amounts of memory and people still created wonders on them!

Medium memory

Oce you get up to 160k of RAM, Java Micro-Edition (J2ME). This is also the minimum needed for MicroPython.

Standard memory

Now you are in the realm of standard application software, with the full gamut of common languages. C and C++ still feature here, as do Python, java, Go, Rust, C# etc.

Web applications

Again, a familiar realm. Javascript, PHP, Perl, Ruby, etc.

Big data

Another novel domain. This is where R and Python with NumPy feature as languages, and distributed systems such as Hadoop live.


Copyright © Jan Newmarch, jan@newmarch.name
Creative Commons License
"The Internet of Things - a techie's viewpoint" by Jan Newmarch is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Based on a work at https://jan.newmarch.name/IoT/.

If you like this book, please donate using PayPal