3 ms·
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 lam
by amelius 12y ago
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.
- anaphor 12y agoThey 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.
- jjaredsimpson 12y agowhy does this matter, what is the overwhelming use case for self referential anonymous functions.
- userbinator 12y agoso 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.