Hacker News new | ask | show | jobs
by tshaddox 1420 days 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.

2 comments

> 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.

> 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.

True, the syntax will obviously depend on what primitives the language provides. Of course it could also just provide the abs() function directly.