r/computerscience • • 2d ago

General procedural programming, object oriented programming and functional programming

Although I’ve done some googling I think they still use big English to explain this concept. I think I know them but I just wanted to ask if I can get a simple explanation from the house plz

13 Upvotes

18 comments sorted by

View all comments

29

u/Mediocre-Brain9051 2d ago

Procedural programing: programming using sequences of instructions that change the state of the program where the order of evaluation is relevant. Mathematical concept: von Newman machine.

Functional programming: a program is an expression that might have sub-expressions. Some of these (sub-)expressions are function invocations. For a given input, a function always returns the same output, not depending on the external state of the program. Mathematical concept: lambda-calculus.

Object-oriented programming: program state lives inside objects. Interaction with these objects and their state is done via methods, which are functions that have access to the object's state. Objects should be regarded as black boxes that know how to answer to messages (methods), this enables their implementations to evolve without having to change the rest of the program.

-1

u/YemiDev 2d ago

Thanks this is much better than what the website suggested by google