Programming Languages
Programming languages are formal systems of communication used to instruct computers in executing tasks. They consist of sets of syntactical rules and semantics that define how instructions are structured and interpreted. At the most basic level, programming languages can be categorized into several generations: first-generation (machine code) directly executes on hardware but is challenging for humans to use; second-generation (assembly languages) is more accessible yet still requires conversion to machine code; and third-generation languages, such as Java and C++, offer greater abstraction, making them easier for developers to work with. Higher-level programming languages, like Ruby and Python, further enhance usability and are increasingly common in modern computing.
Programming languages can also be distinguished by their paradigms, such as imperative and declarative styles, which dictate how instructions are organized and executed. The rise of pseudocode, which combines natural language with programming syntax, facilitates understanding complex algorithms without delving into strict code. As technology evolves, especially with the expansion of the Internet and automated systems, the demand for diverse programming languages and paradigms continues to grow, reflecting the need for innovative and efficient solutions in an interconnected world.
On this Page
- FIELDS OF STUDY
- ABSTRACT
- What Are Programming Languages?
- How Programming Languages Are Structured
- Using Pseudocode
- Sample Problem
- The pseudocode below describes an algorithm designed to count the number of words in a text file and to delete the file if no words are found:
- Open the file
- For each word in file
- If counter = 0 Then
- Close the file
- Answer:
- Open the file
- For each word in file
- If wordcount > 300 Then
- Close the file
- The Future of Programming Languages
- Bibliography
Subject Terms
Programming Languages
FIELDS OF STUDY
Computer Engineering; Software Engineering; Applications

ABSTRACT
A programming language is a code used to control the operation of a computer and to create computer programs. Computer programs are created by sets of instructions that tell a computer how to do small but specific tasks, such as performing calculations or processing data.
What Are Programming Languages?
Programming languages are constructed languages that are used to create computer programs. They relay sets of instructions that control the operation of a computer. A computer's central processing unit operates through machine code. Machine code is based on numerical instructions that are incredibly difficult to read, write, or edit. Therefore, higher-level programming languages were developed to simplify the creation of computer programs. Programming languages are used to write code that is then converted to machine code. The machine code is then executed by a computer, smartphone, or other machine.
There are many different types of programming languages. First-generation, or machine code, languages are processed by computers directly. Such languages are fast and efficient to execute. However, they are difficult for humans to read and require advanced knowledge of hardware to use. Second-generation languages, or assembly languages, are more easily read by humans. However, they must be converted into machine code before being executed by a computer. Second-generation languages are used more often than first-generation ones because they are easier for humans to use while still interacting quickly and efficiently with hardware.
Both first- and second-generation languages are low-level languages. Third-generation languages are the most widely used programming languages. Third-generation, or high-level programming, languages are easier to use than low-level languages. However, they are not as fast or efficient. Early examples of such languages include Fortran, COBOL, and ALGOL. Some of the most widely used programming languages in the twenty-first century are third-generation. These include C++, C#, Java, JavaScript, and BASIC. Programming languages with higher levels of abstraction are sometimes called fourth-generation languages. Higher levels of abstraction increases platform independence. Examples include Ruby, Python, and Perl.
Programming languages can be based on different programming paradigms or styles. Imperative languages, such as COBOL, use statements to instruct the computer to perform a specific sequence of operations to achieve the desired outcome. Declarative languages specify the desired outcome but not the specific sequence of operations that will be used to achieve it. Structured Query Language (SQL) is one example.
Programming languages can also be classified by the number of different computations they can perform. Turing complete programming languages can perform all possible computations and algorithms. Most programming languages are Turing complete. However, some programming languages, such as Charity and Epigram, can only perform a limited number of computations and are therefore not Turing complete.
How Programming Languages Are Structured
The basic structural rules of a programming language are defined in its syntax and semantics. A programming language's syntax is the grammar that defines the rules for how its symbols, such as words, numbers, and punctuation marks, are used. A programming language's semantics provide the rules used to interpret the meaning of statements constructed using its syntax. For example, the statement 1 + pizza might comply with a programming language's syntax. However, adding a number and a word together (as opposed to adding two numbers) might be semantically meaningless. Programs created with a programming language must comply with the structural rules established by the language's syntax and semantics if they are to execute correctly.
Abstraction reduces the structural complexity of programs. More abstract languages are easier to understand and use. Abstraction is based on the principle that any piece of functionality that a program uses should be implemented only once and never duplicated. Abstraction focuses only on the essential requirements of a program. Abstraction can be implemented using subroutines. A subroutine is a sequence of statements that perform a specific task, such as checking to see if a customer's name exists in a text file. If abstraction is not used, the sequence of statements needed to check if a customer's name exists in the file would need to be repeated every place in the program where such a check is needed. With subroutines, the sequence of statements exists in only one place, within the subroutine. Thus, it does not need to be duplicated.
Using Pseudocode
The programming language statements that comprise a program are called "code." Code must comply with all of the programming language's syntax and semantic rules. Pseudocode uses a combination of a programming language and a natural language such as English to simply describe a program or algorithm. Pseudocode is easier to understand than code and is often used in textbooks and scientific publications.
Sample Problem
The pseudocode below describes an algorithm designed to count the number of words in a text file and to delete the file if no words are found:
Open the file
For each word in file
counter = counter + 1;
If counter = 0 Then
Delete file
Close the file
Use the pseudocode to describe an algorithm that counts the number of words in a file and then prints the number of words if the number of words is greater than 300.
Answer:
Open the file
For each word in file
wordcount = wordcount + 1;
If wordcount > 300 Then
print wordcount
Close the file
The pseudocode above uses natural language for statements such as Open the file and programming language for statements such as wordcount = wordcount + 1. Pseudocode cannot be executed by a computer. However, it is helpful for showing the outline of a program or algorithm's operating principles.
The Future of Programming Languages
Programming languages are growing in importance with the continued development of the Internet and with the introduction of new programmable machines including household appliances, driverless cars, and remotely controlled drones. Such systems will increase the demand for new programming languages and paradigms designed for larger, more complex, and highly interconnected programs.
Bibliography
Belton, Padraig. "Coding the Future: What Will the Future of Computing Look Like?" BBC News. BBC, 15 May 2015. Web. 24 Feb. 2016.
Friedman, Daniel P., and Mitchell Wand. Essentials of Programming Languages. Cambridge: MIT P, 2006. Print.
Harper, Robert. Practical Foundations for Programming Languages. Cambridge: Cambridge UP, 2013. Print.
MacLennan, Bruce J. Principles of Programming Languages: Design, Evaluation, and Implementation. Oxford: Oxford UP, 1999. Print.
Scott, Michael L. Programming Language Pragmatics. Burlington: Kaufmann, 2009. Print.
Van Roy, Peter. Concepts, Techniques, and Models of Computer Programming. Cambridge: MIT P, 2004. Print.
Watt, David A. Programming Language Design Concepts. West Sussex: Wiley, 2004. Print.
Woods, Dan. "Why Adopting the Declarative Programming Practices Will Improve Your Return from Technology." Forbes. Forbes.com, 17 Apr. 2013. Web. 2 Mar. 2016.