3 ms·
Thank you. You put into words what I was thinking. The best paradigm in programming has to be procedural style. The cleanest code I’ve written and read has alw
by danhau 3y ago
Thank you. You put into words what I was thinking.
The best paradigm in programming has to be procedural style. The cleanest code I’ve written and read has always been procedural. I even maintain a monster VBA Word Macro at work and - after some much needed refactoring - its pretty easy to understand (ignoring VBA’s warts).
The flow of logic and dependencies on data is much easier to follow in procedural.
- thewix 3y agoI prefer functional. Procedural is not restrained enough and allows for mutable global state. This can go off the rails when multiple people are in the code. Functional stresses composition so functions should stay small, and ADTs allow for all effects (errors!) to be represented. Strong typing helps reduce the number of tests I need to write, as well.
- diarrhea 3y agoI think ADTs and effects system are orthogonal though. A “print” has an effect but I don’t know of languages where failure of that is propagated (for example in Rust, println doesn’t evaluate to Result).