12 ms·
There's a style of programming with no concept of loops or jumps. It's called functional programming. There's other styles that are drastically different as wel
by nendroid 6y ago
There's a style of programming with no concept of loops or jumps. It's called functional programming. There's other styles that are drastically different as well.
Most of these styles aren't new though.
- commandlinefan 6y agoWell, at the risk of being pedantic, I think you're being pedantic: at the machine-code level, all those function calls resolve to jumps and their recursive base-cases are terminating cases of loops. Functional programming is a great way of organizing loops and jumps, but they're still loops and jumps.
- ajuc 6y agoAt the machine code level there's no Iteration just GOTO :)
- commandlinefan 6y agoWell, there's unconditional goto (jmp) and conditional "goto" (branch).
- lerptime 6y agoHe's not talking about machine level code. He's talking about while loops in regular programming. I don't think the person was aware that there are paradigms that avoid looping. To be more pedantic and get even lower level than machine code, at the theoretical level the basis of computation can be either procedural or functional. See lambda calculus and Turing machine for more info.
- buzzerbetrayed 6y agoYou don't think Uncle Bob knows there are paradigms that avoid looping? Sorry, but that is absurd. This isn't some random internet blogger. Uncle Bob has proven himself knowledgable enough to know something as basic as that, even if he is a controversial figure. And please let me know if "the person" refers to someone else. I've read the comment chain all the way up and can only make sense of what you said if "the person" == Uncle Bob.
- lerptime 6y agoI don't know about uncle bob. But certainly what he said is untrue. Programming doesn't even have "while loops" as a primitive. From that wrong statement I assume uncle bob doesn't know much. Of course I could be wrong. I don't know the guy. But that statement alone is enough for me to make a negative judgement against him.
- commandlinefan 6y agoWell, all electronic computers all the way back to the Mark II have had unconditional branches (jumps) and conditional branches: I guess you're strictly correct that "while loops" aren't technically primitives, but conditional branches are and the only reason you'd ever use one is to perform the equivalent of an if or a while.
- lgunsch 6y agoLisp has been around for decades. Wikipedia says 1958, which predates C by many years. It is indeed functional and favors recursion over loops.