0

There are lots of different programming languages in 4 different paradigms:

  1. Object-Oriented
  2. Functional
  3. Logical
  4. Procedural

I could write a program in all programming paradigms e.g a fraction that I could write it using classes in OOP and also I could write it using functions in a functional programming language. So why do we need diferent proglangs and paradigms?

Guy Coder
  • 24,501
  • 8
  • 71
  • 136
Navid
  • 3
  • 2
  • why each of us chooses a different car ? bread ? etc. ... who knows :) and how about assembler ? it is more faster, right ? each solution has its convenience... – Denis Kuzmin Jun 26 '14 at 10:50
  • 1
    Mostly because programmers can't survive without flamewars. – molbdnilo Jun 26 '14 at 11:42

2 Answers2

2

According the the master Hal Abelson almost every programming language is built upon three things:

  1. Primitive elements
  2. Means of combination
  3. Means of abstraction

I write almost since some esoteric languages, like BrainFuck, doesn't have means of abstraction.

So what do one paradigm offer that another doesn't? Well a different solution to these 3 and perhaps that has a more suitable expressiveness for the certain tasks. I won't go into specifics since it becomes very opinion based so I suggest you try learning to program in the different paradigms and find out for yourself.

Now procedural is usually what you have at the hardware level no matter what language you are programming in so it is the real thing while all the others are more abstract.

Sylwester
  • 47,942
  • 4
  • 47
  • 79
0

Programming paradigms exists for the benefit of programmers themselves. They all represent different attempts at creating a common platform of abstraction that are as beneficial as possible when starting to solve arbitrary problems. Turing completeness clearly states that any program can basically be written in any programming language that satisfies a certain basic set of rules. Therefore it makes little difference once the program is running what paradigm it is written in. The important part is that there is a person or a group behind it that can maintain or enhance it well (and then again we are back at the persons writing the program).

Jacob Oscarson
  • 6,363
  • 1
  • 36
  • 46