Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

> > “In computer science, control flow (or flow of control) is the order in which individual statements, instructions or function calls of an imperative program are executed or evaluated. Within an imperative programming language, a control flow statement is a statement that results in a choice being made as to which of two or more paths to follow.”

> This can be reduced to:

> > “Imperative programs make a choice about what code is to be run.”

No. You left out the part about order, which is the most important part.



view as:

Just nitpicking here but doesn’t the property of being ordered follow from being able to choose between options at any instance?

One analogy that popped up in my mind is sorting: if you can provide an answer to a choice between any two options in a list, in effect you can use that to order the list.


That's an unrelated meaning of the word “order”. In this case, we have statements that all get executed, but in a specific order. There's no choosing between anything. What you're referring to is ordering in the mathematical sense, which means defining what is “bigger” in a certain sense than something else.

Legal | privacy