Questions tagged [procedural-programming]

Procedural programming is a term used to denote the way in which a computer programmer writes a program. This method of developing software, which also is called an application, revolves around keeping code as concise as possible. It also focuses on a very specific end result to be achieved. When it is mandatory that a program complete certain steps to achieve specific results, the code is said to have been written according to procedural programming.

Procedural programming is not always the preferred method of coding applications. Software that is highly complex can require literally thousands of lines of code, making it somewhat more difficult for a team of people to work with it. Some programmers hold the opinion that extremely large applications can become difficult to maintain even by one developer.

Some people wrongly believe that it is impossible to write very large or complex software in a procedural programming language. Certain programs might be more easily written using Object Oriented Programming (OOP), but this does not mean that they cannot be developed procedurally. The Linux kernel, which is the core of an open-source operating system, is written using procedural programming. Other major applications such as the Apache server, the Drupal content management system and Samba, are all written in this manner. These applications are large and are considered to be complex by the overwhelming majority of programmers.

Among the procedural programming languages in existence are C, Fortran and Python. Many important applications and utilities have been coded in such languages. For example, Anaconda, the installer for Fedora Linux, is written in Python, as are various software managements tools.

Imperative programming is another term used to signify this type of development.

252 questions
320
votes
17 answers

What is the difference between procedural programming and functional programming?

I've read the Wikipedia articles for both procedural programming and functional programming, but I'm still slightly confused. Could someone boil it down to the core?
Thomas Owens
  • 114,398
  • 98
  • 311
  • 431
251
votes
7 answers

OOP vs Functional Programming vs Procedural

What are the differences between these programming paradigms, and are they better suited to particular problems or do any use-cases favour one over the others? Architecture examples appreciated!
121
votes
8 answers

What is the difference between declarative and procedural programming paradigms?

What is the difference between the declarative and procedural programming paradigms? Could you please provide some examples? What other programming paradigms exist?
Tarik
  • 79,711
  • 83
  • 236
  • 349
118
votes
9 answers

Truly understanding the difference between procedural and functional

I'm really having a hard time understanding the difference between procedural and functional programming paradigms. Here are the first two paragraphs from the Wikipedia entry on functional programming: In computer science, functional programming…
117
votes
5 answers

simple explanation PHP OOP vs Procedural?

I would like to learn PHP and want to get an Idea about OOP and Procedural. I read some other blogs and tutorials about OOP vs Procedural but I still can't understand the approach. OOP vs Procedural Which I should learn? What is the difference in…
Pennf0lio
  • 3,888
  • 8
  • 46
  • 70
41
votes
23 answers

Does procedural programming have any advantages over OOP?

[Edit:] Earlier I asked this as a perhaps poorly-framed question about when to use OOP versus when to use procedural programming - some responses implied I was asking for help understanding OOP. On the contrary, I have used OOP a lot but want to…
Patrick O Connell
32
votes
17 answers

What's the difference between a procedural program and an object oriented program?

I'm fairly new to programming but I've been reading some interesting discussions on StackOverflow about various programming approaches. I'm still not 100% clear on what the difference is between procedural programming and object oriented…
Kerzin
31
votes
1 answer

Why is object oriented PHP with mysqli better than the procedural approach?

I have been using the procedural approach with mysql* until recently. Now I want to shift to mysqli and object oriented approach. Many online resources and books state that OOP is better than procedural even in case of PHP. After going through some…
Stacy J
  • 2,721
  • 15
  • 58
  • 92
30
votes
13 answers

Are side effects a good thing?

I feel the term rather pejorative. Hence, I am flabbergasted by the two sentences in Wikipedia: Imperative programming is known for employing side effects to make programs function. Functional programming in turn is known for its …
29
votes
7 answers

Does function definition order matter?

In the script below, does the order in which items are declared matter? For example, if the add_action points to a function that has not yet been defined? Does it matter or should the function declaration always precede any code in which its…
Scott B
  • 38,833
  • 65
  • 160
  • 266
27
votes
3 answers

What's the difference between functional, structured and procedural programming?

I have read some articles on all subjects, but I don't quite get the differences.
26
votes
2 answers

Does procedural language have design patterns?

In my experiences, I often see some design patterns such as visitor patterns, strategy pattern,... in object oriented languages like Java... But I haven't seen much patterns in procedural languages like C... I wonder if those patterns exist in…
user188276
23
votes
20 answers

How do i get out of the habit of procedural programming and into object oriented programming?

I'm hoping to get some tips to kinda help me break out of what i consider after all these years a bad habit of procedural programming. Every time i attempt to do a project in OOP i end up eventually reverting to procedural. I guess i'm not…
Shadi Almosri
  • 11,678
  • 16
  • 58
  • 80
19
votes
9 answers

Struggling with C coming from Object Oriented land?

When I am presented with programming problems, I naturally start breaking them up into logical objects in my head. Who has what responsibility, who owns what, who derives from what, etc. I am struggling with C. I just don't get how to do things in…
KingNestor
  • 65,976
  • 51
  • 121
  • 152
16
votes
2 answers

Are statistical programming languages like R/SAS considered functional or procedural

I still don't understand the difference after reading this So, rather than asking what is the difference between functional vs procedural programming, I thought, maybe a language that I am familiar with can serve as an example. Hence, my…
Victor
  • 16,609
  • 71
  • 229
  • 409
1
2 3
16 17