Why Study Programming LanguagesΒΆ
Among the reasons to study programming languages are:
- Increased knowledge about how computations can be expressed.
- Ability to intelligently compare and contrast languages, which is useful if you ever need to choose a language for a project.
- Better able to learn new programing languages.
- Understanding of important implementation details. This could be useful when debugging certain kinds of errors, or explaining why a certain feature is as it is.
- Better use of languages you already know. Seeing how a different language implements things can give you insight in how to better use a different language. For example, learning Java can help you become a better C++ programmer because in Java you are unavoidably exposed to a wide variety of common object-oriented design patterns.
Historically, the design of programming languages has been pushed by a number of application areas:
- Scientific computing. Scientists typically use computers for large numerical applications, and, most famously, the FORTRAN programming language was designed for such applications.
- Business. Computers have long been used in business applications. COBOL, for example, was an early and very influential programming language designed for business applications. Another important business-oriented language is SQL, the query language typically used in relational databases.
- Artificial intelligence (AI). AI research began in the 1950s, and one of the earliest languages developed by AI researchers was LISP. LISP is still used today in various forms (some people even argue that JavaScript is, at heart, just a weird version of LISP). Another notably language to be used in some AI research is Prolog, a logic programming language that takes a very different approach to programming.
- Systems programming. Languages like C and C++ are designed in large part for writing systems programs, i.e. the kinds of low-level programs needed by an operating system. C is the most influential language in this category in part because Unix/Linux is written almost entirely in C.
- The web. The world wide web has also had a major influence on programming languages. For example, JavaScript and PHP are both languages design explicitly for use on the web.
When evaluating programming languages, we often consider the following sorts of features:
Readability. How hard is it for humans to read? Issues here include things like language simplicity, syntax, and use of data types.
Writability. How hard is it for humans to write? Issues here include simplicity, syntax, support for abstraction, and expressivity.
Reliability. Does the language let you write programs that work as specified? Issues here include simplicity, type checking, and exception handling.
Tooling. How hard is it to write automated tools for processing the language? Issues here include simplicity, and well-definedness of the syntax and semantics of the language.
Cost. What is the cost of using a language? Cost covers many things, including training programmers, tools (e.g. compilers and IDEs), development time, testing, and so on. For many long-lived real-world programs, the cost of maintaining the program is the largest part of its cost, which suggests that languages that enable easy to maintain programs are often cost- effective.
Community. Do many people here use the language? Are their good manuals, tutorials, and other supports for the language?
In practice, the presence, or absence, of a large community of users trumps technical aspects of languages. For example, PHP and JavaScript are extremely popular, but from a technical standpoint they leave a lot to be desired.
Efficiency. Some languages are inherently more time, or space efficient, than others. In practice, efficiency may or may not be a major issue. For instance, in many simple embedded systems, efficiency may be of the utmost importance, which greatly restricts the choice of language. But if you have a fast computer with lots of memory, then efficiency may be much less of a concern, and other features, such as ease of development or reliability may be more important.
No programming language is perfect, and all languages must make trade-offs between these features.