What is a programming language? A programming language is an artifical language, which is created to help humans to write computer programs. Computer programs perform some kind of computations or algorithms. This way the computers or devices like printers or robots are controlled by the humans and do what they want. A programming language is defined by syntactic and semantic rules. All programming languages define data structures and have elements to control the flow of execution.
A programming language allows a programmer to provide a set of instructions ( = program) for a computer. These instructions have to be precise and complete. The computers are not intelligent. They are just hardware. The program controls the computer and lets it do intelligent things like complicated computations or searching for information. Therefore the instructions in the program have to be precise and complete. There is no unversal programming language that serves all purposes. There are more than 1000 different programming languages, because of the the diversity of contexts in which languages are used. Programs can be written by single amateur programmers or by teams of many professional programmers. Some are only a few lines of code, some are huge with millions of lines of code. To execute a program in a specific programming language, the code has to be processed by an interpreter (also a program) or compiled to a machine readable format by a compiler. The difference is that the interpreter always processes the whole code at runtime where the compiler generates a file which can be executed by the computer without a new compilation of the code. |