| Thread overview | |||||||||
|---|---|---|---|---|---|---|---|---|---|
|
March 18, 2012 Issue 7670 | ||||
|---|---|---|---|---|
| ||||
I need to attract a bit of your attention to this: http://d.puremagic.com/issues/show_bug.cgi?id=7670 Currently this (very nice) code gets accepted even with the -property compiler switch: [1, 2, -3, 4].filter!(x => x > 0).map!(x => x ^^ 0.2).writeln; Bye, bearophile | ||||
March 18, 2012 Re: Issue 7670 | ||||
|---|---|---|---|---|
| ||||
Posted in reply to bearophile | On Sunday, 18 March 2012 at 02:50:40 UTC, bearophile wrote:
> I need to attract a bit of your attention to this:
>
> http://d.puremagic.com/issues/show_bug.cgi?id=7670
>
> Currently this (very nice) code gets accepted even with the -property compiler switch:
>
> [1, 2, -3, 4].filter!(x => x > 0).map!(x => x ^^ 0.2).writeln;
>
> Bye,
> bearophile
Is UFCS planned for 2.059?
| |||
March 18, 2012 Re: Issue 7670 | ||||
|---|---|---|---|---|
| ||||
Posted in reply to F i L | On Sun, Mar 18, 2012 at 05:33:21AM +0100, F i L wrote: [...] > Is UFCS planned for 2.059? [...] It's already checked into git. So it will be in 2.059 for sure. T -- Let's call it an accidental feature. -- Larry Wall | |||
March 18, 2012 Re: Issue 7670 | ||||
|---|---|---|---|---|
| ||||
Posted in reply to H. S. Teoh | H. S. Teoh wrote:
> It's already checked into git. So it will be in 2.059 for sure.
Great!
| |||
March 18, 2012 Re: Issue 7670 | ||||
|---|---|---|---|---|
| ||||
Posted in reply to bearophile | On 18.03.2012 6:50, bearophile wrote: > I need to attract a bit of your attention to this: > > http://d.puremagic.com/issues/show_bug.cgi?id=7670 > > Currently this (very nice) code gets accepted even with the -property > compiler switch: > > [1, 2, -3, 4].filter!(x => x > 0).map!(x => x ^^ 0.2).writeln; > I fail to see how property should affect this code in any way, no '=' anywhere in sight. UFCS is indeed nice. -- Dmitry Olshansky | |||
March 18, 2012 Re: Issue 7670 | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Dmitry Olshansky | On Sunday, 18 March 2012 at 10:32:59 UTC, Dmitry Olshansky wrote:
> On 18.03.2012 6:50, bearophile wrote:
>> […]
>> [1, 2, -3, 4].filter!(x => x > 0).map!(x => x ^^ 0.2).writeln;
> I fail to see how property should affect this code in any way, no '=' anywhere in sight.
> UFCS is indeed nice.
Calling parameterless functions without parens?
David
| |||
March 18, 2012 Re: Issue 7670 | ||||
|---|---|---|---|---|
| ||||
Posted in reply to David Nadlinger | On 18.03.2012 15:36, David Nadlinger wrote: > On Sunday, 18 March 2012 at 10:32:59 UTC, Dmitry Olshansky wrote: >> On 18.03.2012 6:50, bearophile wrote: >>> […] >>> [1, 2, -3, 4].filter!(x => x > 0).map!(x => x ^^ 0.2).writeln; >> I fail to see how property should affect this code in any way, no '=' >> anywhere in sight. >> UFCS is indeed nice. > > Calling parameterless functions without parens? > > David Ah, right. It was right there in the plain sight :) -- Dmitry Olshansky | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply