Re:Mindset Shifts for Functional Programming
by KingMob on Thursday April 06, 2023 @01:51AM
(#35464649)
Recursion doesn't do that by default, though. And if you have to alter your code to run recursive fns on a new thread or executor, nothing prevents you from doing something similar with a loop, either.
[ Parent
| on HN ]
Re:Mindset Shifts for Functional Programming
by austin-cheney on Thursday April 06, 2023 @02:17AM
(#35464823)
Recursion does do that by default respective to what the given function executes. No alteration or special convention is required. Loops that require use of syntax other than a function call are synchronous only.
If it would you can find me on IRC and I would be more than happy to show you how to program.
Re:Mindset Shifts for Functional Programming
by KingMob on Thursday April 06, 2023 @03:37AM
(#35465437)
I see you've gone from recursion "can iterate asynchronously" to it "does do that by default".
In most languages, recursion is not asynchronous, even if it could be, which is part of the point I was making. I'm guessing English is not your first language.