| ▲ | stouset 5 hours ago | |
Would someone please explain to me why TCO—seemingly alone amongst the gajillions of optimization passes performed by modern compilers—is so singularly important to some people? | ||
| ▲ | oersted 4 hours ago | parent | next [-] | |
For people that like functional style and using recursion for everything, TCO is a must. Otherwise there’s no way around imperative loops if you want decent performance and not having to worry about the stack limit. Perhaps calling it an “optimization” is misleading. Certainly it makes code faster, but more importantly it’s syntax sugar to translate recursion into loops. | ||
| ▲ | Rusky 4 hours ago | parent | prev | next [-] | |
TCO is less of an optimization (which are typically best-effort on the part of the compiler) and more of an actual semantic change that expands the set of valid programs. It's like a new control flow construct that lives alongside `while` loops. | ||
| ▲ | aaronblohowiak 5 hours ago | parent | prev [-] | |
functional programming background / SICP ? | ||