Lambda Over Lambda in C++14 -- Chris Kohlhepp

A nice complement to the C++14 lambda article we linked to yesterday:

Lambda Over Lambda in C++14: The Convergence of Modern C++ on the Lisp Programming Style, Part II

by Chris Kohlhepp

From the article:

Let us see how that simplifies under C++14 and generic lambdas.

Three observations are striking immediately:
1) The use case for a template has disappeared entirely. We simply have a generic function argument x. This matches Lisp.

2) The code is now entirely as brief as Lisp. Where Lisp has a lot of parenthesis, this style of coding develops a lot of “autos.”

3) The mechanics are identical also. Both functions are actually named lambdas...

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.