3 ms·
> Depends on your definition of "flow control". Yep. That’s why this is a potentially useful rule of thumb for comparing programming languages, especially ones
by tshaddox 4y ago
> Depends on your definition of "flow control".
Yep. That’s why this is a potentially useful rule of thumb for comparing programming languages, especially ones that skew very far in one direction or the other, but it’s not a rigorous definition of the concepts.
Some incredibly simple algorithms are difficult to explain naturally without it sounding like control flow. How would you describe the absolute value function without saying “if” or “when” or specifying one particular element from a set? Obviously any computer system needs to be able to determine what steps to take depending on specified conditions.
- TedDoesntTalk 4y ago> How would you describe the absolute value function without saying “if” or “when How is this? absolute value is distance a number is from 0. I get your point, though.
- tshaddox 4y agoTrue, the syntax will obviously depend on what primitives the language provides. Of course it could also just provide the abs() function directly.
- naniwaduni 4y ago> How would you describe the absolute value function without saying “if” or “when” or specifying one particular element from a set? I don't think you even want a conditional when describing the absolute value function on the complex numbers.