Question

easy theory question. I have a couple years experience with PHP and Javascript, trying to branch out into other languages and to connect my experience with some theory.

Have been reading about programing paradigms like imperative, functional, object-oriented, etc. Is there any reason, within a particular program, to commit to one paradigm or another? I can think of reasons to mix, say, object oriented statements with functional statements, but then yo read about like, whole languages that 'belong' to a paradigm (like Lisp and functional programming, for example)

Is there any reason or advantage to commit to a particular paradigm, or is it okay to just roll with what works?

Was it helpful?

Solution

Most software today is built using Object Oriented Programming, because this paradigm makes it easy to organize large amounts of code. With that said, the more paradigms you know, the better.

One particular paradigm of interest is functional. While pure functional programming isn't used very often in industry programming, a lot of the ideas are currently spilling over to Object Oriented languages like Java and C# (like the concept of first class functions, and avoiding mutation). Once you learn new paradigms, it'll change (and often improve) the way you program in other, more common or popular programming paradigms.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top