On 02.05.2016 22:20, Adam D. Ruppe wrote:
On Monday, 2 May 2016 at 20:11:53 UTC, Timon Gehr wrote:
I don't think { ... } as shorthand for (){ ... } is necessary or
particularly useful in the first place.
Indeed. I don't think =>x as a shorthand for {return x;} is really worth
it either... D ha
On Monday, 2 May 2016 at 20:11:53 UTC, Timon Gehr wrote:
I don't think { ... } as shorthand for (){ ... } is necessary
or particularly useful in the first place.
Indeed. I don't think =>x as a shorthand for {return x;} is
really worth it either... D has a ridiculous number of variations
on fu
On 02.05.2016 19:31, Adam D. Ruppe wrote:
On Monday, 2 May 2016 at 15:52:34 UTC, Xinok wrote:
I'm proposing that we add a warning to the compiler for this
particular case. If the programmer intended to return a lambda, then
rewrite the expression as one of:
I agree, forcing people to rewrite i
On Monday, 2 May 2016 at 15:52:34 UTC, Xinok wrote:
I'm proposing that we add a warning to the compiler for this
particular case. If the programmer intended to return a lambda,
then rewrite the expression as one of:
I agree, forcing people to rewrite it is a good idea.
D has a few ways of writing lambda expressions / anonymous
functions:
x => doSomething()
{ doSomething(); }
(){ doSomething(); }
While the flexibility is great, there's a hidden issue for those
programmers who come from different languages and are used to
writing:
x => { doS