Hacker News new | ask | show | jobs
by seansh 537 days ago
> There should be a programming language that enables arbitrary complexity through deterministic linear code, as humans seem to have an innate comfort with.

I agree that linear code is easier to read and understand. I've noticed that often when my own code gets confusing it is because it's too nested, or too many things are happening at once, or the order of actions is not clear. After gaining a deeper understanding of the problem, rewriting it in a more linear fashion usually helps but not always possible.

I'm curious how a programming language could enable writing complex code in a linear fashion if the complexity of the code is due to the interconnected nature of all its parts. In other words, there may be no way to connect all the parts in a linear way without oversimplifying.

Of course, sometimes the complexity is incidental, that is, if I were a little smarter or spent more effort, I could reduce the complexity. But some complexity is intrinsic to the problem being solved.

The question that really fascinates me is not why code is non-linear, but why literature isn't?