An Introduction To Programming With Processing

Lower Level Languages and Higher Level Languages

Generally speaking higher level programming languages are closer to human spoken languages (or natural languages) and lower level programming languages are closer to machine code, or binary.
However this classification might not always be so clear. C++ is one language that some might argue, challenges this programming language stereo type. C++ is a programming language that has all the features that one would expect from a higher level language such as an easy to read syntax, object oriented programming and extensive collections of libraries to add to the language's capabilities but also has other features that are not commonly found in high level programming languages such as memory management, user defined operator overloading, six different integer datatypes and a plethora of compilers to choose from. As a result many refer to C++ as a mid-level programming language.

Following is the C version of a “Hello World” Program:
#include <stdio.h>
int main(void)
    printf("hello, world\n");
    return 0;
Following is the C++ version of a “Hello World” Program:
// 'Hello World!' program 
#include <iostream>
int main()
  std::cout << "Hello World!" << std::endl;
  return 0;
Following is what is considered to be the Processing version of a “Hello World” Program (which simply draws a line to the screen):
line(10, 20, 80, 90);
For Processing this distinction is currently not so difficult to make. Processing is by all current standards a high level programming language, meaning it has an easy to read syntax, supports modern day programming concepts such as Object Oriented Programming, has it's own IDE (Integrated Development Environment something we will become more familiar with throughout this course) and fundamentally it abstracts a lot of machine specific interactions for us making the code more readable for humans.

However, it's worth considering that the terms that define “high” and “low” level programming languages are relative to the time period in which they are used. For example when the programming language C (which C++ is based on) was first introduced in the early 1970's it was considered to be a high level language as it supported such features as expression evaluation (according to rules of precedence) and datatyping, both of which are programming concepts common to most non-esoteric modern day programming languages. As technology progresses, new concepts become common place and rapidly replace older more cumbersome programming designs, till we get to the point where there are far less people that would refer to an older language such as C as being a high level programming language and a lot more people that would refer to it as a low level language, lacking modern abstractions and less direct hardware interactions. Processing might one day, also be subjected to such a topic of discussion.

mockupsThe level of abstraction that is needed in order for a language to qualify as a high level programming language does not come without it's penalties. Low level languages, because they are conceptually closer to machine code are considered to produce more efficient machine readable code, of course this is largely dependent on the programmer creating the code. As mentioned before the greater the level of abstraction of the code, the greater the amount of resources will be required by the machine interpreting the code. As a result of this relationship high level programming languages generally are not ideal for systems where resources are limited. Initially, this consideration might not seem particularly relevent to you, but the amount of technology running on limited resources like a digital watch, television, fridge, GPS, mobile phone, remote-controlled air-conditioner, electronic toys, media players and the list goes on... is actually quite extensive! In fact if you were to think about it there are not many devices like computer workstations, laptops or computer servers that are designed to have their resources, available to the software that runs on these machines, as extendable. Yet, even these machines have their limitations.

Ultimately software, whether it is designed with a high level or low level programming language, should always take into consideration the possible limitations of available system resources and consumption of energy required to run that code.