Python, Perl, Haskell, Lua, and many other programming languages are high level languages. When you code with these languages, you use familiar concepts, for example, loops and data stores.
However, your code is processed by the computer with very different often unfamiliar concepts such as binary numbers and machine language. These internal details are hidden from high level languages. For example, you do not need to know how to assign data to a specific memory register in your computer when you assign a value to a variable in PHP.
Where do high level languages come from? Machine languages, the first computer programming languages, evolved into assembly languages which evolved into high level languages.
Machine languages deal directly with registers to store data and memory addresses for the computer hardware. Assembly languages only work with a specific computer processor and environment. Assembly languages are compiled (or converted) into machine code by a software utility called an assembler. The machine code is then run on a computer.
In contrast, high level languages work with many different operating systems and deal with variables, arrays, and other other abstract ideas easily understood by humans. The conversion from high level to machine code is transparent to coders and people who use software created by high level programming languages.
There are a few other useful details to know about high level programming languages:how they are executed, how they work internally, and how they work with data.
High level languages are executed by a computer in different ways:
- Interpreted languages have their code read then acted upon immediately. In some cases, the code is compiled into machine code then executed.
- Compiled languages are read then converted to executable code.
- Translated languages are read then converted into a lower-level language.
To make things more confusing, high level languages can be read and executed in some combination of these three execution models.
Different languages also abstract their internal processes different ways:
- Object-oriented programs organize functionality and code into objects and classes.
- Functional programming uses blocks of code to perform tasks when a block is called in the program.
- Syntactic programming uses macros and other methods to expand the syntax used by a programming language.
These internal processes are designed to improve the efficiency, clarity, and speed of code. While each programming language will have a dominant way to process data, languages can combine two or three types of programming in some way.
There also are different kinds of abstraction in any programming language:
- Control abstraction deals with actions, for example, moving bits of data and adding or multiplying bits of data.
- Data abstraction deals with use and storage of data, for example, keys and values for data.
While high level languages involve more complexity than machine languages, the benefits gained by use of high level languages outweigh any negatives. And, as noted above, different programming languages use one or more methods of interpretation and execution to gain benefits. Which language works best depends on what you need to accomplish.