19

I started in High School learning java and python and I guess I just always learned OOP and nothing else my question is What are the other programming paradigms or types of programming languages beside OOP?

Community
  • 1
  • 1
if_zero_equals_one
  • 1,716
  • 4
  • 17
  • 30

5 Answers5

35

"Opposite" isn't really a good way of putting it. What's the "opposite" of Democracy? OOP is a a paradigm -- a way of viewing the problem of programming.

The four main coding paradigms are:

  1. functional (viewing programs as mathematical formulas)
  2. imperative (programs are series of instructions for the computer)
  3. logical (model information and the relationship between that information), and
  4. OOP (Model objects and how it interacts with other data)

http://www.cs.aau.dk/~normark/prog3-03/html/notes/paradigms_themes-paradigm-overview-section.html#paradigms_logic-paradigm-overview_title_1

Logical is the most different by far and you have to jump through a lot of hoops to solve some problems in logical programming. The other three all solve the same problems, but the approaches are different.

Gabriel Staples
  • 36,492
  • 15
  • 194
  • 265
Jeremy
  • 5,365
  • 14
  • 51
  • 80
  • 4
    Also functional and logical fall under declarative, which is the opposite of imperative. http://en.wikipedia.org/wiki/Declarative_programming – Aram Kocharyan Feb 15 '13 at 04:20
  • 2
    The opposite of democracy is dictatorship. There is *definitely* an opposite. The opposite of rule by many = rule by a few (or rule by one). – Gabriel Staples Apr 10 '20 at 23:35
  • 1
    I'd say based on what the asker is after, **procedural** is the opposite of **object-oriented** programming. Procedural is a subset of **imperative**, but more narrowly defined as being imperative + relying on blocks & scope (source: https://en.wikipedia.org/wiki/Procedural_programming#Imperative_programming). With this in mind, in a sense, C (a primarily procedural programming language) is the opposite of C++ (a primarily object-oriented programming language).Therefore, although your answer is the most informative, [@Geoffrey's](https://stackoverflow.com/a/6295189/4561887)is the most correct. – Gabriel Staples Apr 11 '20 at 20:17
5

Procedural Programming is one of the other forms used.

http://en.wikipedia.org/wiki/Procedural_programming

Geoffrey
  • 10,843
  • 3
  • 33
  • 46
2

These answers are all wrong ... and that is a VERY good question ... and the answer is .... "AOP" - i.e. an "Algorithmic Oriented Programming" entirely based on the "algorithm" being at the very centre of the concept - in an AOP the "data" or an "object" or "objects"are simply "passed to the algorithm" - i.e. THE ALGORITHM IS ENTIRELY KING (it "knows" what to do with the data) - the data carries around "nothing".

In fact "we" (at Inferix) think OOP is a blind alley!

AOP is a much better model of reality - OOP is fine for "images on screens" and "data processing" but it cannot encapsulate intelligence - because "relationships and dynamics and intelligence" are not at it's core!

So we think that "AI Entities" (coming soon) will use only AOP!

Practically speaking Algol60, Coral66 and Inferix-MTR are examples of AOP languages - Algol60 became Pascal and Ada and the likes - and these just became more and more OOP (e.g. Delphi)!

The start of "typing" of values marked the end of AOP!

However: MTR is still a strictly AOP language (but unfortunately at present it is designed for AI entities to use and not humans).

You could think of an AOP as a language that strictly "prohibits" the typing of data elements and is only concerned with "values" of "signals".

Kolky
  • 2,917
  • 1
  • 21
  • 42
Clive Williams
  • 103
  • 1
  • 8
  • 1
    You know that AOP also stands for "Aspect-Oriented-Programming"? https://en.wikipedia.org/wiki/Aspect-oriented_programming – Kolky Aug 23 '17 at 13:40
  • Well I did not know that ! – Clive Williams Aug 24 '17 at 15:00
  • Well I did not know that .. that AOP seems nice... everything has it's place! the more views we have of "reality" the better. then let the winner win in the future and let there be lots of winners for each field of modeling. i.e. all that sentient entities are are really good "modeling beings" that can model their own futures and choose one - we do not actually use the term AOP anyway. One more thing >> TO AI PEOPLE ALL HUMAN LIFE AND ALL MOVEMENT WILL BE COMPLETELY STATIONARY - so we won't matter to them at all - i.e. do we worry about what will eventually happen to stupid rocks - kbo me :) – Clive Williams Aug 24 '17 at 15:18
  • btw i still think that there is an opposite for OOP and my reason for thinking that is that basically there ate only two things involved in a dynamic process of logic (i.e. any Turing Machine) .. so EITHER the algorithm or the data are king ! (they do a little dance together) & there is a result ... so as there are only two "things" involved in any Turing Machine logic process (i.e. all logical processes) then there are only two possible candidates for the dominant one ... either the data is king (as in OOP) or the algorithm is king (as in AOP) ... and all the grey in between of course :) – Clive Williams Aug 24 '17 at 15:48
  • At "THE INFERIX PROJECT" we think that the algorithm is in the universe "is king" .. We think that because of the dynamics of the universe (i.e. the physics of it) ... i.e. the universe is NOT filled with objects it is filled with uncertainty (Heisenberg type uncertainty) and "statistical" near-solutions to Schrodinger equations and with the Higgs ether joining it all (uncertainly) and some of these solutions look a bit like objects or particles or atoms etc to us and the universe. BUT IT IS REALLY THE DYNAMICS THAT GIVES RISE TO THESE PARTICLES .. I.E. THESE OBJECTS. – Clive Williams Aug 24 '17 at 15:57
  • practically >> think of a house... it is an "OBJECT" ... we can do lots of things to it (i.e. live in it, paint it, extend it, knock it down, etc) but in fact that list of things we can do is infinite - these things are the "METHODS" (that we would have to "drag around" with that object to fully understand it). so we think it's much better to say well forget all that ... i am going to "PAINT" (that's what OOP people would call a "METHOD")... now what on earth can I "PAINT" certainly not an atom or air or voices ...but I CAN PAINT A HOUSE ! – Clive Williams Aug 24 '17 at 16:11
  • cont .. and so i can say "i am going to PAINT my" ...then there are not that many things that i could have that could be painted by me and so "my HOUSE" is certainly one of them -> so i have reduced the huge pyramid of possibilities by expressing the problem on it's head and by placing the ALGORITHM (i.e. the METHOD) at the heart of the expression of the TM defined relationship instead of the OBJECT.. so practically speaking it's all much quicker as i can get all my paint tools out straight away while i wait on the house "appearing" because I DO KNOW THAT I AM GOING TO BE PAINTING SOMETHING !! – Clive Williams Aug 24 '17 at 16:15
  • https://timecube.2enp.com/ – Sloan Reynolds Sep 24 '21 at 14:20
2

There is no such thing. OOP is a concept built on top of procedural programming, there is no opposite rather there is a choice of writing in OO or not.

Otávio Décio
  • 73,752
  • 17
  • 161
  • 228
1

There are several but i would say Functional Programming is the most opposite.

http://en.wikipedia.org/wiki/Functional_programming

Chris Kooken
  • 32,730
  • 15
  • 85
  • 123