3

When it comes to name things like if, else, or return, many developers and a lot of documentation calls it control flow or control flow statements.

https://docs.oracle.com/javase/tutorial/java/nutsandbolts/flow.html

On the other hand, some developers and some documentation calls it flow control and flow control statements respectively.

https://www.ibm.com/support/knowledgecenter/en/SSTFXA_6.3.0/com.ibm.itm.doc_6.3/adminuse/terminal_scriptflowcontrol_tep.htm

And as the third option, some people and some documentation uses the term flow of control and, respectively, flow of control statements.

There was even some arguing on Wikipedia:

https://en.wikipedia.org/wiki/Talk:Control_flow (The last section there.)

Are there any technical or grammatical reasons to prefer one terminology and not others?

  1. control flow / control flow statements
  2. flow control / flow control statements
  3. flow of control / flow of control statements
4
  • 3
    There is no difference from a technical perspective. From a grammatical perspective, perhaps post the question on English Language Stack
    – John Wu
    Commented Jul 31, 2020 at 22:25
  • 2
    Flow control has a different meaning in network communications (regulating the volume or rate of traffic flow per unit of time). During the early days of computing, reusing an existing terminology and injecting new meaning (which, literally, hijacks that term with the new meaning) was seen as appropriate. Nowadays, such practice is frowned upon as it causes confusion across the board.
    – rwong
    Commented Aug 1, 2020 at 2:15
  • 2
    @JohnWu I doubt that any linguist without software engineering or development background could find an as enlightening explanation as the accepted answer here ;-)
    – Christophe
    Commented Aug 1, 2020 at 7:04
  • Execution path control statements would be a better name. But that's a lot of syllables. Commented Aug 3, 2020 at 21:03

2 Answers 2

5

The word "control" seems to be used in two different senses in these phrases - phrases which nevertheless have identical meanings.

In "flow control", the word control is being used to refer to a statement governing the "flow (of control)". The normal flow is sequential whereas a "flow control statement" is capable of "controlling" (causing non-sequential progression of) the program counter (or instruction pointer).

In "control flow" (or "flow of control"), the word control is used to refer to the statement which is currently "in control of" the processor (i.e. is undergoing execution) - in this sense of the word, the idea that a "control flow statement" governs the flow is only implied.

It would be logically legitimate (although risible and confusing) to fully refer to a "control flow control statement", or a "control of flow of control statement", because in each of these two examples, the word control is being used one time each for each of the two relevant senses. And that concludes the comic relief.

5
  • 2
    Slight disagreement here: "flow control" is actually about the control of flow, and flow in that context typically means the flow of data. Flow control would be concerned with limiting or temporarily halting the data flow. Using the expression "flow control" in place of "control flow" would create confusion in most contexts except where participants have agreed on a "wrong" meaning (just as the could agree that it means "cupboard", which would make its use equally confusing to "outsiders".) Commented Aug 1, 2020 at 11:30
  • 2
    @Hans-MartinMosner I need a flowchart to pick my Flow diagram Commented Aug 1, 2020 at 16:54
  • 2
    @Hans-MartinMosner, "Slight disagreement here: "flow control" is actually about the control of flow, and flow in that context typically means the flow of data" - yes, but that's also a completely different use of the word "flow"! The OP's main references (IBM and Oracle, which both have some considerable authority in the computer world) are both clearly referring to the flow of instruction processing, not a flow of data (or data flow).
    – Steve
    Commented Aug 1, 2020 at 18:20
  • @Steve you're right, I guess IBM wouldn't hesitate to name it "cupboard" as well :-) Commented Aug 1, 2020 at 18:34
  • @Hans-MartinMosner, well they could hardly do any worse than the linguistic muddle that already exists haha! On a serious note, a paucity of vocabulary has developed in computing, with many words for the same meaning, and many meanings for the same word. We will be descending to neanderthal grunts soon if we are not careful!
    – Steve
    Commented Aug 1, 2020 at 20:57
2

Linguistic arguments aside, "flow control" already means something different in computing. It's used when you have a stream of data and you need to make sure the sender doesn't send it faster than the receiver can handle, as in RS-232.

In other words, "flow control" is about controlling the flow of data and "control flow" is about the flow of CPU control. The terms are confusing, and somewhat interrelated, but we're stuck with them now.

1
  • I have used the term flow control in both contexts and this is the first time it occurs to me that it can mean two different things. Commented Aug 3, 2020 at 20:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.