DEV Community

Cover image for What's your fav programming paradigm?
Madza
Madza

Posted on

What's your fav programming paradigm?

Programming Paradigm is a style, technique, or way of writing a program. Part of a programmer's growth involves the ability to choose the appropriate programming paradigm for the given tasks.

The most common programming paradigms today are object-oriented programming, procedural programming, and functional programming.

What's your favorite and why?

Discussion (6)

Collapse
alainvanhout profile image
Alain Van Hout

For programming paradigms, my personal favourite is all of them, applied to the contexts in which they work best.

Collapse
raguay profile image
Richard Guay

This is the truth! There isn’t a “one solution to everything”. Every problem has it’s unique set of tools to help solve it. Some do overlap, but there is never a one thing fits all.

That aside, I like functional programming, but it doesn’t work with all domains equally. My JS code often looks like a combination of OOP and Functional.

Collapse
greenroommate profile image
Haris Secic

Best answer packing the infamous "it depends"

Collapse
buphmin profile image
buphmin

Preach!

Collapse
bias profile image
Tobias Nickel

In oOp it is so difficult to determine the livetime of objects and if properties change over time.

for most node.js server applications the word functional programming is taking it to short. because testing a unit with input and output does not meet what we are doing when implementing application servers (same in php, ruby,....), when the only thing we are doing is to build side-effect machines.

I started saying to do structured programming. A bit as described by Kevlin Henney. I name it structured programming, even dough in my current project, most methods are part of a class.

using class syntax does not necessarily mean to do OOP, same as the use of pure objects or structs still allow you to organise code in a object oriented manner.

thanks for this question 👍

Collapse
smileymike profile image
Michael Cunnane

I like Python because it doesn't have to be OOP alone unlike Java, too strict, too dogma. Python has the flexible of functional. If it is simple, I use simple functions to solve it, if it is minimally complex that not neat by using functions, I use OOP. I kind like pythonic because of data model such as repr etc to have whole python ecosystem interface to my custom Objects. I use progamming C and little bit of haskell for fun in solving puzzles like i.e. project euler after I solve it with python first. I find python is easier to solve euler first because of fewer lines to get answers. I learn to improve programming C because of Cython and progamming C by playing C with project eular opening me up to the optional opportunity to do Linux operating system programming such as following "Linux Programming Interface" book and minix3. it is the main reason because of exploration of computing and computer science during my lifetime journey. Therefore, it is reason why I need to have good programming lang C. It wasn't really about paradigms for me it was about accessing hardwares and softwares by possessing required skills.