The ugliest LISP in the world

There’s been a lot of discussion on whether Python, Ruby or insert your favorite dynamic language, is a good lisp.

I just noticed some old code of mine where I had tried to be clever/lispy in PHP, which I just had to share, it’s absolutely amazing. Don’t try this at home.

array_map(
	create_function('$a','$a->stamp = strtotime($a->createdDate); $a->wallType = "activity"; return $a;'), 
	$acts
);

return array_filter(
	$acts, 
	create_function('$a', 'return $a->type != "title";')
);

This is simply… I don’t know what this is, ah yeah, it’s as close as you can get to lisp in PHP5.

Laugh or weep, up to you :)

Related Posts

Tags: ,