Basic Concepts of Programming Languages - Overview

Introduction to Programming Languages

Basic Concepts of Programming Languages - Overview

A programming language is a tool we use to accomplish certain tasks, and most times depending on the task at hand, using the right tool (programming language) can be very helpful and efficient. We have a lot of programming languages, but some fundamentals cut across a lot of these languages. When you have an understanding of these concepts, it would be a lot easier diving into a new programming language, since all you'd have to do is learn how these concepts are handled in that particular programming language.

Fundamental Concepts

Variables

Variables are the names you give to computer memory locations that are used to store values in a computer program. Variables store information while our program is running. They are like boxes we put things in so we can make use of it later.

Data Types

Data types are the different types of data we can process using our computer program. They refer to the type of value a variable has or can accommodate. Some examples of data types are strings, integers, float, boolean, and array.

Operators

An operator in a programming language is a symbol that tells the compiler or interpreter to perform a specific mathematical, relational or logical operation and produce a final result. Some examples of operators are +, -, *, >, <.

Conditional Statements

They are features of programming languages that tell the computer to execute certain actions, provided certain conditions are met. They allow the computer program to take different paths of action depending on the condition that was met.

Loops

A loop in a computer program is an instruction that repeats until a specified condition is reached. If we wanted a piece of code to run 5 times, instead of copying and pasting the code 5 times, we can use loops to make the code run 5 times.

Functions

A function is a block of organized, reusable code that is used to perform a single, related action. There are certain times you want to use the same block of code multiple times at different sections, you can define a function for that block of code and call the function wherever you need that code.

Conclusion

These are some of the fundamentals that cut across multiple programming languages. We would be looking at them individually in depth in upcoming articles using different programming languages to explain them and get a better understanding of them. See you in upcoming articles.