Nepedia
Back to Discover
Fluent Reader
💻

Programming paradigm

technology Maturity 5-7 Next article →

A programming paradigm is a high-level way to plan a computer program. It is a way to think about how to structure code.

Programming paradigms
Programming paradigms

Different languages use different paradigms to get work done. Some languages only use one way of thinking. For example, the language Smalltalk uses object-oriented programming. The language Haskell uses functional programming. Most modern languages can actually use many different paradigms at once. A person writing code might choose different parts of a language to solve a problem.

Programming paradigms
Programming paradigms

There are two main ways that code can work. The first way is called imperative programming. This method gives the computer a specific list of steps. It tells the machine exactly what to do and in what order. It also allows side effects, which means the program can change data at one time and read it later.

Programming paradigms
Programming paradigms

The second way is called declarative programming. This way does not give a list of steps. Instead, it describes the result you want to see. The computer then decides the best order to run the operations.

People have studied these different ways for a long time. The idea of a paradigm comes from computer science research. This research helps people compare different ways to write software. The concept of a paradigm was used by Thomas Kuhn in 1962. Later, Robert W. Floyd gave a famous lecture about them in 1978.

Programming paradigms
Programming paradigms

In the early days, programming was very different. Many early programs used something called a goto statement. This often created "spaghetti code" that was very hard to fix. To solve this, researchers created structured programming to make code cleaner.

Many different types of paradigms exist today. Object-oriented programming organizes code into objects. These objects hold both data and the actions that go with it. Functional programming treats a program like a series of math tasks. There is also concurrent programming for computers with many processors. This allows many tasks to happen at the same time.

Programming paradigms
Programming paradigms

Other types include visual programming, where you use pictures instead of text. There is even a new way called vibe coding. In vibe coding, a person uses natural language to describe a program. Then, an AI helps write and improve the code.

You can think of paradigms like different styles of building. One person might build with blocks that snap together. Another might build by following a very strict set of instructions.

Programming paradigms
Programming paradigms

Some people use tools that focus on math, while others use tools that focus on objects. Even though they all build something, the way they think is different. Learning these different ways helps people build much better tools. It makes it easier to understand how a program will behave. It also helps people prove that a program is correct.

456 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (1)
File:Programming paradigms.svg
Programming paradigms.svg
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.