Comment on Open Thread, Jun. 15 - Jun. 21, 2015

Wed, 17 Jun 2015 11:03:14 GMT

I am not really sure what you are asking here, maybe a rewording could help. But let me add something else. I remember the huge holy wars on Reddit 10 years ago about various programming paradigms, object-oriented being one and functional the other and so on. While today OOP is incredibly popular and widespread, it has its own drawbacks. Detractors say it was mainly made for simulation and it is very easy to get lost in simulational, "what is what" type of problems like X is an subclass of Y or Z, what is the proper type for something or things like that, so these structural issue, instead of doing what programming is arguably about: writing algorithms to process data. Of course I don't want to start those debates over, I just want to say OOP is generally as simulational paradigm. Or you could say OOP is a map. And sometimes simulational approaches are an overkill, and sometimes not the best idea. This was for example one anti-OOP article: http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html

My programs are not very complicated, but it is suprising how far I can get with plain simple basic structural programming paradigm. This means basic types, basic data structures like arrays or hashes, and functions that process them. Adding a bit of a functional programming paradigm i.e. instead of looping over arrays, mapping a function or lambda function to them takes it even further.

My point is that one decision is to be done really early: am I more or less simulating something? Then OOP. Am I trying to massage some input data into a different form of output data? Probably structural with a bit of functional does it. If the language itself is OOP like Java, structural programming largely means using public static classes as functional libraries, not instantiating them, just calling their methods as functions. int four = Math.add(2,2) type of approach, that is what is generally called structural here, where the class is just a function library.

Discuss