Re:Why does nobody seem to know what imperative and declarat...
by naniwaduni on Friday July 29, 2022 @11:36PM
(#32284068)
> 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.
Re:Why does nobody seem to know what imperative and declarat...
by TedDoesntTalk on Friday July 29, 2022 @11:26PM
(#32284025)
> 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.
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.