Stefan Tilkov's Random Stuff

Everything Becomes Lisp

Patrick Logan points to an article containing this example:

function quoteWords()
{
     return array_map('quoteWordsHelper',
            function ($string) {
                return preg_replace('/(\w)/','"$1"',$string);
            });
}

There's little doubt lambda functions and closures have become mainstream if they're in PHP :-)

Comments

On December 12, 2008 5:34 PM, lqd said:

and c++0x :)

On December 14, 2008 9:38 AM, myxomycetes said:

@Iqd I just read a paper from Hans Böhm http://www.hpl.hp.com/personal/Hans_Boehm/c++mm/threadsintro.html and there’s the line “…, in spite of the fact that we do not expect it (C++0x Standard) to be formally adopted as an ISO standard until 2010 or 2011. A Committee Draft of the standard is currently available, and we expect a number of vendors to begin support for parts of it sooner than 2011.” So I really wonder if C++ might have become irrelevant for the definition of “mainstream”.