On Thu, 9 Apr 2020 09:51:24 +0800, David Crayford wrote: >As Martin previously mentioned some languages implement proper tail >calls so they effectively turn recursion into iteration >https://www.lua.org/pil/6.3.html. > It better preserve the semantics of variable scope.
>This is a great optimization as recursion is often the most elegant >method to implement many data structures and algorithms (quicksort, >binary trees etc). > In some cases it avoids, or at least delays, stack overflow. Remember to put the long branch on the right. -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
