What is a Programming Language

What is a Programming Language?

A programming language is a formal system for writing programs for computers and smartphones. It is defined by a set of lexical, syntactic, and semantic rules that dictate a program’s appearance and the actions that an executor or computer can perform.

Programming languages are technical, artificial languages. They consist of specific words, functions, and operators, each of which has a clear meaning that a computer can interpret. Operators are usually English words that indicate which operations should be activated when they are added to the code. Virtually all existing programming languages ​​have this in common. Differences between languages lie in the syntax, approach, or paradigm.

Types of Programming Languages

  1. Low-level programming languages ​​are languages ​​that are structurally similar to the real or virtual processor’s instructions (for example: Java, Microsoft .NET). Mnemonic notation is usually used to designate machine instructions. This allows commands to be memorized not as a series of zeros and ones, but as meaningful abbreviations of words from human language (usually English). For example: Assembler, Forth.
  2. High-level programming languages ​​are languages ​​designed to be quick and easy to use by the programmer. The defining feature of high-level languages ​​is abstraction, that is, the introduction of semantic constructs which briefly describe data structures and their operations. These descriptions are often very long and difficult to understand in machine code or a low-level language. Using a variety of translators and interpreters ensures that programs written in high-level languages ​​can communicate with different operating systems and hardware, while their source code remains unchanged. Examples: C++, C#, Python, Fortran, Visual Basic, Perl.
  3. Safe programming languages ​​are those ​​in which programs that have been accepted by the compiler as correctly formed never dynamically go beyond acceptable behavior. The program may contain errors, but it is not capable of violating the integrity of the data and crashing. Examples: Standard M, Cyclone, Rust.
  4. Unsafe programming languages ​​are the opposite of safe languages. Programs written in such languages may contain errors that can lead to problems with accessing the device's memory or cause the entire program to crash. Examples: C, C++, Java.
  5. Compiled programming languages ​​are those ​​whose source code is converted by a compiler into machine code and written to a file with a special header and/or extension for subsequent identification as executable by the operating system. The compiler translates the program’s source code into machine language immediately and entirely. Compiled programs run quickly and don’t require additional programs to operate, but the need to recompile when editing the code presents challenges in development. Examples: Assembler, C++, Pascal, Ada, Erlang.
  6. Interpreted programming languages ​​are languages ​​whose source code is executed by the interpretation method. If a program is written in an interpreted programming language, the interpreter executes the source code of the program without prior translation into binary code. The program remains in its original language and cannot be run without an interpreter. Interpreted programs run slower than compiled programs, but they can be run immediately after modification, which is convenient for developers. Examples: PHP, JavaScript, Python.

The Most Common Programming Languages

JavaScript

JavaScript is commonly used as an embeddable language for programmatic access to application objects. It is most widely used in browsers as a scripting language for making web pages interactive.

Advantages of JavaScript:

  • Fast for the end user: the script is executed on the user's computer, rendering nearly instantaneous results.
  • Simplicity: The language is easy to learn and implement. It uses the DOM model, which provides a lot of preset functionality for various objects on pages.
  • Versatility: JavaScript works great with other languages ​​and can be used in a wide variety of applications.

Disadvantages of JavaScript:

  • Security: JavaScript is added to web pages and client browsers and can use the user's system, so malicious code can be run on the client machine.
  • Browser Support: JavaScript is sometimes interpreted differently by different browsers, resulting in inconsistencies in terms of functionality and interface.
  • Disabling JavaScript: If you disable JavaScript in the browser, none of the JavaScript code will run.

Python

Python is used in web app and game development. It is convenient for automation, mathematical calculations, and machine learning. Companies like Google, Facebook, Dropbox, Spotify, Quora, and Netflix all used Python at certain stages of development.

Pros of Python:

  • Logical, concise, and understandable. Compared to many other languages, Python has an easy to read syntax.
  • Cross-platform. Works on a variety of platforms, including Linux and Windows.
  • There are interpreters for mobile devices and unpopular systems.
  • In high demand in the labor market.
  • Many high-quality libraries (sets of functions and pre-made templates written in one programming language).

Cons of Python:

  • Low program execution speed compared to other languages.
  • Has strict code requirements (such as indentation).
  • Features of Unicode output

C#

C# is useful for developing websites (ASP.NET), client and web applications, cross-platform mobile applications, and games in Unity 3D and CryEngine.

Pros of C#:

  • Microsoft support
  • Lots of syntactic sugar, which are elements that make code easier to write and understand (especially when the code is written by another programmer) and do not play a role during compilation.
  • Intermediate entry threshold. The syntax is similar to C, C++, and Java, making it easy for other programmers to learn. For beginners, it is also one of the most promising languages ​​to learn.
  • The Xamarin tool, which allows you to write in C# for Android and iOS.
  • High Demand: There are many vacancies for a C# programmer in all regions.

Cons of C#:

  • Oriented towards .NET (on the Windows platform).
  • Only provided free of charge for small companies, students, and solo programmers. For large teams, purchasing licenses can be expensive.

Java

Java is a language for distributed programming and comfortable remote collaboration. It is used for creating server applications that receive data from one server, process it, and pass it on.

Advantages of Java:

  • Object-oriented programming
  • A high-level language with simple syntax and a smooth learning curve
  • The standard for enterprise computing systems
  • Security
  • Independent of platforms
  • Multithreading

Cons of Java:

  • Paid commercial use
  • Low performance
  • Lacks native design
  • Lengthy and complex code

C++

C++ is used in all areas of programming: from highly loaded systems to microcontrollers. C++ allows you to write web servers, games, computer programs, components, and so on.

Pros of C++:

  • Good compatibility with C
  • High performance
  • Cross-platform compatibility
  • Multithreading
  • Availability of literature and documentation
  • Functional programming
  • Free
  • Versatility

Cons of C++:

  • Not useful for the Web, although the Apache and Nginx web servers are written in C++
  • A high entry threshold
  • Confusing and cumbersome syntax. C++ has a large number of mandatory lines.
  • Difficult to find errors. By contrast, there are a lot of tools for C# such as ReSharper that will find the errors for you, but for C++ you have to do it manually.
  • Not suitable for enterprise applications

Ruby

Ruby is widely used in web development, system administration, and operating systems (Mac OS, Linux, BSD).

Pros of Ruby:

  • Requires 40-50% less development time compared to other programming languages
  • Flexibility. Applications can easily be changed, improved, or expanded upon release.
  • Simplified interaction between developers thanks to heredity (there is a clear sequence in the structure and methodology when writing the code).

Cons of Ruby

  • Very few specialists
  • Costly servers

PHP

PHP is used for creating scripts to run on the server and execute the command line as well as windowed applications that run on the client side.

PHP pros:

  • Multifunctionality. By using a template engine, not only can you create scripts for web applications, but also full-fledged programs and mobile apps.
  • Cross-platform compatibility. PHP can be run on any operating system, including Unixoids.
  • Support for almost any web server
  • Free distribution
  • Sufficient arbitrariness for web development
  • Plenty of educational materials
  • The language continues to develop and evolve

Cons of PHP:

  • Unidimensional: The language is “honed” for programming the Internet, although it has expanded capabilities through various implementations.
  • Security. PHP has system-level and web-application level security, but the bad guys are always one step ahead.
  • Contradictions in the code. The language contains syntax from several other languages ​​(C, Java) which can be confusing for the developer.
Next term