Il y a quand même des cas ou cela marche, on dirait :
We find most cases of tail _recursion_ convert reasonably well to loops, and most cases of non-recursive tail calls encode state machines that convert reasonably well to loops wrapped around enums. Neither of these are _quite_ as pretty as the tail-call-using variants, but they do work and are "as fast"*, as well as idiomatic for C and C++ programmers (who are our primary audience).
[^] # Re: simple ?
Posté par Nicolas Boulay (site web personnel) . En réponse au journal Rust en version 0.12. Évalué à 2.
Il y a quand même des cas ou cela marche, on dirait :
We find most cases of tail _recursion_ convert reasonably well to loops, and most cases of non-recursive tail calls encode state machines that convert reasonably well to loops wrapped around enums. Neither of these are _quite_ as pretty as the tail-call-using variants, but they do work and are "as fast"*, as well as idiomatic for C and C++ programmers (who are our primary audience).
"La première sécurité est la liberté"