As far as I know (not much I'll admit), the currently popular programming paradigms are Object Oriented (Java, C#, Ruby) vs functional (F#). As someone who is mostly familiar with the first paradigm, I have several questions:
Obviously, there are no "best" languages, but I'm wondering whether it's worth the investment of time and energy to learn a new paradigm. Thanks in advance!
One of the most popular programming paradigms is object-oriented programming (OOP). The core concept of OOP is to separate concerns into entities which are coded as objects. Each entity will group a given set of information (properties) and actions (methods) that can be performed by the entity.
"Or in other words, can all problems be reduced to nails for one hammer?" Yes. Period. Any programming language you are likely to run into will be as complete as all others. There's actually a formal definition of "completeness" for a programming language.
"Have people ever needed to learn a new paradigm?" Always.
There's actually a trick to following the ups and downs of the "paradigm shifts". Over the last 30 years of my career, I've seen that programming has grown from a relatively simplistic imperative/procedural model to a number of much richer models that include a better balance between process and data.
I've noticed the following...
Part of the driving force is the artificial intelligence community. Many of these "new models" started as AI knowledge representation schemes. They got traction there, then they trickled into more mainstream applications.
The Entity Relationship model was originally for knowledge representation, not business transactions. The Object model, similarly, was for knowledge representation. Then the simulation folks found it. Now the rest of us have it.
Here's my conclusion.
Software is Knowledge Representation.
Your choice of Paradigm or Model or Approach or Style is based on the answer to the following question:
"How Can I Best Represent This Problem?"
If the problem has objects and relationships, OO. If the problem has algorithms and transformations, maps, filters and reduces, Functional. If the problem is dynamic, changing and flexible, Dynamic. If the problem is static and will scale up rapidly, Static.
It's worth learning alternate paradigms (OO, functional, procedural, dynamic, etc) because it will help you think about problems in different ways.
For example, think about the difference in solving a tree traversal in a linear fashion (the first way I ever did it) versus using recursion. Or Google's combination of Map and Reduce to help them index the internet.
New ways to think applied to old problems can help break some of the hardest issues.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With