Uncategorized

03: Algorithmic Programming Languages

Algorithmic Programming Languages

There are hundreds of programming languages designed to work with different types of systems and requirements. We can categorize the programming languages into different ways. First, we will discuss common features in algorithmic programming languages and later we will see the categories.

Programming Language

  1. A programming language is a set of rules called grammar or syntax.
  2. Grammatical structure and rules in natural languages like Urdu, English or Chinese also exist in programming languages.
  3. Components of a programming language are following:
  4. Keywords: Words defined by the language creators. Their purpose is fixed, and they cannot use it in the programming language for some other purpose.
  5. Labels: Words defined by developers who are developing software in this language.
  6. Special Characters: These are not words. These are symbols like +, -, *, &, |, () etc.
  7. Statement Termination: Every program is a set of statements. The statement terminator is a special character that tells the compiler where a statement ends.
  8. Casing: Some languages are case sensitive like C/C++ or Python while some languages are not. For example, in C, a label like age is different from Age because letter A is capital but in Visual Basic, age and Age are considered the same.

Low-Level vs High Level Languages

  1. Low-level languages are closer to computer hardware but difficult for humans to code.
  2. The program is written in low-level language and executes very quickly.
  3. Critical systems like airplanes, military equipment and software for medical devices are often written in low-level languages.
  4. Low level languages are highly dependent on hardware.
  5. Assembly is the only language for low-level coding that is currently in use.
  6. Only small programs can be written in these languages.
  7. High-level languages are near to humans but slower in execution.
  8. High level language code first converted to low-level code and then executed.
  9. These can be easily coded.
  10. Large software like websites, mobile apps, games, point of sale systems and student management systems are written in high-level languages.
  11. High-level languages are not hardware dependent but they are dependent on Operating Systems.

Specific Purpose vs General Purpose

  1. Some programming languages are designed for a specific task.
  2. Fortran was created for engineering and scientific problems, PHP was designed for server-side web applications and SQL is specific for databases.
  3. Fortran, PHP and SQL can be considered as specific purpose programming language.
  4. C/C++, Python, Java, C# are examples of general-purpose.
  5. Developer can use these languages for many kinds of tasks like C# can be used for web development, game development and mobile applications.

Compiled vs Interpreted

  1. When a developer writes code in high level-language then it is required to translate it in low-level language. This process can be performed by two different methods, Compilation or Interpretation.
  2. In compilation, the whole program converts to low-level code.
  3. The compilation process creates a new file such as .exe for execution.
  4. The interpretation process performs line by line to translate high-level code to low-level code.
  5. It doesn’t create a standalone executable file; it just executes the source code file.
  6. The compilation process is slow but when the exe file is generated, it becomes fast.
  7. Interpretation is slower.
  8. Compilation is not easily portable.
  9. Interpretation is easily portable.
  10. C is compiler-based while Python is interpreter-based languages
  11. Some programming support both; such as C# and Java are the examples.

Stand Alone vs Framework based

  1. When we run a program, then it requires resources like CPU, memory, input and output.
  2. It also requires releasing these resources when they are no longer in use.
  3. The operating system is responsible for providing these resources to a program.
  4. In modern days, an operating system has to manage hundreds or even thousands of programs simultaneously.
  5. Security is also an important aspect (which program is allowed to run and which is not allowed).
  6. To share the workload with the operating system, many programming languages are coming with built-in management systems.
  7. These management systems are called Framework.
  8. A framework may have following components
  9. Compiler/Interpreter
  10. Libraries
  11. Memory manager
  12. I/O manager
  13. Run time environments
  14. Some programming languages are very simple and they do not require framework. They only work with compilers or interpreters.
  15. C/C++, Python, Fortran and JavaScript are the examples of standalone languages.
  16. Java, C# and server-side JavaScript are the examples of Framework based languages.

Computing Environments and Programming Languages

  1. We have discussed the computing environments Lecture 3, point 4.
  2. Programming languages also important in context of computing environment
  3. Low level programming language is good for embedded devices.
  4. For web and mobile development, we only use the languages which are specified for this purpose.
  5. Normally, general purpose programming languages can be used for all computing environments.

Leave a Reply

Your email address will not be published. Required fields are marked *