Why you don't need the Y combinator in Perl 6
perlgeek.de
perlgeek.de
I wouldn't say this except for how people go ballistic if their "anonymous functions" aren't supported in a language that has everything else you need. That's silly. You don't need the YCombinator in Perl 5 or Perl 6 because "my $func; $func = sub { $func->(...) }" is perfectly fine.
In other news, the importance of "asynchronous" is that it doesn't block, not that you've manually chopped it up into a lengthy stream of event handlers. If it doesn't block, it doesn't block, even if the code on first impression looks like blocking code but in fact the runtime takes care of the continuation transform for you. (Also I can rant about how the word "immutable" gets misinterpreted and cargo-culted but that would be a lengthier post.)
Please do.
These things are sometimes useful in writing compilers though, but then the transformations are more elaborate.
var x = function y() {
...
y();
...
}
'y' is only bound within the function and allows the function to refer to itself. I.e. you can have anonymous, recursive functions, which is useful in "memberfunctions".Actually the more common
function f() {}
is identical to var f = function f() {}
and not var f = function() {}
Edit: Of course there's also arguments.callee...