Submitted by Dacadey t3_z89cro in explainlikeimfive
Sloloem t1_iyeqfi9 wrote
Reply to comment by OldHellaGnarGnar2 in ELI5: why is using "goto" considered to be a bad practice in programming? by Dacadey
Yeah exactly, to both points. Learning how to do similar things under different paradigms is a great skill because it keeps you from getting too stuck on one way to approach a problem but learning all the available paradigms is mostly an academic exercise. You can learn the paradigms to identify their influences on languages but unless you're going into language design or academia they can be pretty esoteric. Not very many languages are purely single-paradigm. Most languages take influence from multiple paradigms and include features from those that designers like, creating fairly unique ways of expressing program instructions.
Example off the top of my head would be something like Scala. Scala adds features of the Functional paradigm to the Java language which is very Object-Oriented in its design. So if you're writing Scala you can write it like OO code, Functional code, or a mix of both. Scala idioms prefer Functional approaches so if you use those you tend to write less code and stuff runs better but you can also work with objects and gain some benefits of OO concepts like function encapsulation.
Python is another language that takes hints from Functional programming and OO programming, but implements its objects and classes very differently from how Java does it.
Viewing a single comment thread. View all comments