Thread overview
Issue 7670
Mar 18, 2012
bearophile
Mar 18, 2012
F i L
Mar 18, 2012
H. S. Teoh
Mar 18, 2012
F i L
Mar 18, 2012
Dmitry Olshansky
Mar 18, 2012
David Nadlinger
Mar 18, 2012
Dmitry Olshansky
March 18, 2012
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
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
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
H. S. Teoh wrote:
> It's already checked into git. So it will be in 2.059 for sure.

Great!


March 18, 2012
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
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
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