4 ms·
Procedural programming is what I learned first (Pascal), and I trust myself to write good code in a procedural style. I do some microcontroller programming, an
by analog31 9y ago
Procedural programming is what I learned first (Pascal), and I trust myself to write good code in a procedural style.
I do some microcontroller programming, and it's usually straight C. The hardware registers are all global, and their contents change based on external stimuli, so that kind of rules out the idea of stateless programming.
The earlier versions of Visual Basic had kind of a compromise, where it came with a lot of pre-made objects, and you could create objects if you got the special kit, but the casual programmer was only expected to use objects. I kind of adhere to that idea when I write in OO languages such as Python.
I use OO sparingly when programming Python, often to encapsulate hardware functionality, but then use those objects within programs that still look procedural.
I avoid using inheritance, mainly because I don't trust myself to do it in a maintainable way.