Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For what purpose?


Quoth xkcd, "Tail recusion is its own reward."

In all seriousness, even if the y combinator is practically useless in languages that don't have proper TCO (which is specced for ES7), it's a useful learning tool, is powerfully mind expanding, and can help to demonstrate the power of the λ-calculus.


There is a practical application for recursive memoization:

http://blog.klipse.tech/lambda/2016/08/10/y-combinator-app-j...


Is the Y-combinator any more or less dependent on TCO than regular recursion?

The Y combinator is useless in languages that already have builtin support for recursive functions.


Not useless, almost useless:

You can do elegant recursive memoization with the Y combinator as explained here http://blog.klipse.tech/lambda/2016/08/10/y-combinator-app-j...


No, Y is handy for defining nameless recursive functions, but it blows the stack even faster if you don't have TCO.



Implementing a linguistic trait when not built in. Next: continuations. Next: prolog.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: