Jacob Carlborg:

Why not use proper lambdas instead of strings?

Mostly for personal reasons: quoted strings are sometimes a little shorter, and they require you to use arguments with default names (as "a" and "b"), this increased standardization makes me read them a little faster than lambdas that have varying argument names. If I see q{a + b} I don't need to go look what a and b are, for me it's a "standard" sum, like one to be used by a reduce().

It's a bit like the "pointfree" style in Haskell (http://www.haskell.org/haskellwiki/Pointfree ), also named "tacit" in other languages, where you don't name input variables; that if overused makes the code unreadable, but if used a bit and wisely allows you to underline the transformations done on the data instead of on the (sometimes arbitrary) names you give to parts of generic data.

Bye,
bearophile

Reply via email to