4 ms·
I think if your code requires reconstruction of nonlinear pieces to read it, you’ve written bad code. Fundamentally, a program is a list of instructions for a c
by Olreich 5y ago
I think if your code requires reconstruction of nonlinear pieces to read it, you’ve written bad code. Fundamentally, a program is a list of instructions for a computer to run. The more linear that list is, the more efficiently the computer can run it. Linear code is also much simpler to read and understand for us humans as you pointed out. Iterate on the code until you find the linear path through it, otherwise you’re going to be in a world of pain if you need to understand it in the future.
- MontyCarloHall 5y agoIn principle I agree, but it often can’t be avoided. Function calls, loops, and even things as trivial as Boolean short circuiting are all examples of essential, unavoidable nonlinear code.