On Jul 17, 2012 6:50 PM, "Era Scarecrow" <rtcvb32@yahoo.com> wrote:
>
> On Tuesday, 17 July 2012 at 22:13:13 UTC, Eyyub wrote:
>>
>> On Tuesday, 17 July 2012 at 16:56:17 UTC, angel wrote:
>>>
>>> I propose to introduce a reference to the current function, much like 'this' in a class method. Call it 'self' or 'thisFunc', or whatever ...
>>> What might this be good for ?
>>> For implementing recursion in a lambda function. Writing in functional style, one creates many functions, and looking for reasonable names for these functions becomes unnecessarily painful.
>>
>>
>> Good idea !
>> "self" is a cute keyword, or "lambda" but this could break existing code.
>
>
> Mmm.. Why not an inner function to represent the recursive function? True a 'self' reference may resolve the issue,

What about how JavaScript does it.  Anonymous functions can still have a "name" that can be used from inside of a function to refer to itself.

And the most useless example ever.

var f = function func ( i ) {
    return func(7);
};

I think that this is nice because there is no name space pollution, no new keywords needed and it is pretty.