There often exists some level of confusion among professionals connected to the IT industry but not “in the trenches” every day as to the difference between programming languages, libraries, and frameworks. These terms are sometimes used interchangeably, though in fact they are not. Here is a synopsis of the differences between the three, and how, while being different entities, they build on one another.
Wikipedia defines a programming language as “… a machine-readable artificial language designed to express computations that can be performed by a machine, particularly a computer. Programming languages can be used to create programs that specify the behavior of a machine, to express algorithms precisely, or as a mode of human communication.” I would offer a slightly different definition, in that a language is really not machine-readable. Rather, the language is a precisely defined form of human-readable syntax that a language “compiler” can then read, parse, and translate into machine-readable code to be executed. Just as a spoken/written language has nouns, verbs, sentences and paragraphs, a computer language is a basic set of keywords, variables, operators, and other symbols, all of which must be put together in particular patterns to form “sentences” and “paragraphs” that the compiler can understand and use to formulate machine instructions.
Early programming languages were “sequential”, meaning that the program instructions were executed in the same order in which they were entered by the programmer. This presented a maintenance problem because the same instructions would need to be programmed multiple times if those instructions needed to be performed multiple times. The answer to this was the development of “procedural” languages. In such languages the programmer can divide a program into separate “procedures” or “functions”. The practicality of this is that the main program can call the same procedure multiple times, even though the instructions exist in only one place in the program code.
Author: Graeme Swallow
Comments