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

The Y combinator causes problems with typing (it has an infinite recursive type), so I'm curious what solution they came up with.

In any case, if calling a lambda function from within itself is going to take more than a single line of straightforward code, then I'm afraid the solution still doesn't cut it for practical purposes.



so I'm curious what solution they came up with.

I'm guessing a cast. The infinitely long type is not at all a problem in languages with weak type systems like C.


They could've done something similar to what you do when you implement a functional language in C and used a union to represent every possible return type, and included functions (closures if you will) in that union, then you solve the problem of the infinite type.


why does this matter, what is the overwhelming use case for self referential anonymous functions.




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

Search: