Is HTML a programming language?
Python, C++, Java, Fortran, Golang, JavaScript, TypeScript, Kotlin, MARIE, JSX, HTML, CSS.
These are all languages.
But, can you define the differences between each one?
Do you know which one is interpreted?
Is your favourite language compiled into machine code in one go or line-by-line?
In this article — you will learn the differences behind each language and you’ll get a general idea of what happens when you run each language.
Programming languages
Programming languages are simply a set of instructions that tell the computer what to do. We, as developers, put together some logic that the computer follows to perform a task.
Programming languages can be high-level or low level. In this day and age, honestly, most of the development people will come across will be through high level programming languages. These are essentially languages that are human-readable that get converted into some language that your computer can understand. For example, if you run a Java application — the JVM will look for the entry point of the application, find your code, convert your source code into machine code via Javac. This conversion is done by the compiler which scans your code in one go and throws any errors that may occur.
Low level programming languages on the other hand sit very closely with the computer's instruction set. They may be written in machine code or assembly language. Machine code is simply a set of instructions which the CPU understands — this is typically written in binary. Assembly language sits between the CPU and high level language and uses mnemonics to carry out instructions e.g. LDA which may mean Load Data Into Memory Store. Assembly languages typically follows the Von Neumann Architecture. Most general purpose computers are based on von Neumann architecture. This includes using the fetch-decode-execute cycle to process program instructions. Computer performance depends on cache size, clock speed and the number of cores.
Popular programming languages: Java, C, C++ and C# (note how these are all strongly typed languages also)
Scripting languages
As the name suggests, this type of language provides a script which specifies a set of tasks that need to be executed. It is a subset of programming languages. Typically in scripting languages there is no compiler — which means the programs made in these languages are typically interpreted aka scanned line by line (remember compilers compile all our source code into machine readable code in one go).
Popular scripting languages: JavaScript and Python (note how these are both dynamically typed languages also)
Markup languages
Markup languages are typically presentational languages which are heavily involved in structuring a formatting documents. These documents can be the Document Object Model on your website — this is typically done via HTML. This may be a view on your Android application — which may be done via XML. Or it could even simply be a README.md file on one of your github projects.
These languages differ from scripting and programming languages because they typically don’t contain logic or algorithms — it typically just handles the styling or layout of a certain thing (I say typically because JSX in React is an interesting concept — it operates like a markup language but has the power of JavaScript with it!).
Conclusion
From a performance perspective, programming languages are typically more performant than scripting languages due to the fact that it compiles the source code into machine readable code (in 1 go!) — whereas scripting languages tend to pass in source code and interpret it line by line.
And in-case I didn’t explain. Compiler and interpreters are simply different ways to translate code from a language into machine language. Compilers typically take an entire program and convert it into machine code aka binary (or bits of 1/0s) which can be directly read by your computer. Whereas interpreted languages execute your source code and converts it to machine code line by line.
Congrats if you’ve made it this far — if you can answer the question in the title correctly, drop me a message and i’ll buy you a ferrari.