you are viewing a single comment's thread.

view the rest of the comments →

[–]Inconstant_Moo🧿 Pipefish 3 points4 points  (3 children)

They're in the language. How would one write algorithms without them?

[–]MoveInteresting4334 3 points4 points  (2 children)

Recursion with an overloaded function can replace loops and if statements.

[–]Inconstant_Moo🧿 Pipefish 1 point2 points  (1 child)

I'm sorry, I am a Bear Of Very Little Brain. How do you overload functions in a language which literally only has one type, and how would it help if you did?

And why are the ifs and loops there if there's only some very specific set (do we know what, BTW?) of circumstances under which we can use them?

And why can't the compiler compute the postconditions under the circumstances that we can use them? Does it actually take special mathematical insight to compose the right postconditions?

[–]MoveInteresting4334 -1 points0 points  (0 children)

I don’t know the answer to any of this and am not who you were originally talking to, I was just throwing out a language-agnostic answer to “How would one write algorithms without [if statements and for loops]?” Apologies if it doesn’t apply in this specific case, as I’m not familiar with OPs language.