<div dir="ltr">On 6 August 2013 19:25, Jonathan M Davis <span dir="ltr"><<a href="mailto:jmdavisProg@gmx.com" target="_blank">jmdavisProg@gmx.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">On Tuesday, August 06, 2013 11:05:56 Jakob Ovrum wrote:<br>

> What does everyone think?<br>
<br>
I'm completely opposed to the removal of string lambdas. Obviously, they don't<br>
always work. More complicated functions definitely need to use the newer lambda<br>
syntax or function literals. But for simple lambdas, they're way better. I'd<br>
_much_ rather have func!"a != b"(args) than func!((a, b) => a != b)(args) or<br>
func!"a < b"(args) than func!((a, b) => a < b)(args). String lambdas are nice<br>
and short, and I think that they're plenty clear, and if they're not, they're<br>
trivial to explain.<br></blockquote><div><br></div><div>Can you give an example where you've actually used a string lambda before where the predicate is more complex than a basic comparison?</div><div>Surely the solution to this problem is to offer a bunch of templates that perform the most common predicates in place of unary/binaryFun?<br>
</div><div><br></div><div>So rather than: func!((a, b) => a < b)(args)</div><div>You use: func!binaryLess(args)</div><div><br></div><div>Or something like that?</div><div><br></div><div>The thing that annoys me about string vs proper lambda's, is that I never know which one I'm supposed to use. I need to refer to documentation every time.</div>
<div>Also, the syntax highlighting fails.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

We already have string lambdas. Removing them would break code for little<br>
benefit IMHO. If you prefer to use the newer lambda syntax, then use that, but<br>
I think that it's a definite loss if we get rid of the string lambdas, as<br>
they're so much more concise when they do work.<br>
<br>
I also think that all new Phobos functions which take unary or binary<br>
predicates should support string lambdas. It's trivial for them to do so, and<br>
it creates needless inconsistencies if some functions support them and some<br>
don't.<br>
<span class=""><font color="#888888"><br>
- Jonathan M Davis<br>
</font></span></blockquote></div><br></div></div>