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.

PRINICIPAL TERMS

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.




On the TIOBE index for various programming languages, C and Java are the highest-rated languages. By TIOBE Software B.V., CC BY-SA 4.0 (http://creativecommons.org/licenses/by-sa/4.0), via Wikimedia Commons.





On the TIOBE index for various programming languages, C and Java are the highest-rated languages.
By TIOBE Software B.V., CC BY-SA 4.0 (http://creativecommons.org/licenses/by-sa/4.0), via Wikimedia Commons.

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.

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:




PRINICIPAL TERMS

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:




PRINICIPAL TERMS

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.

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.

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, driver-less 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.

—Maura Valentino, MSLIS

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.