www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Issue 7670

reply "bearophile" <bearophileHUGS lycos.com> writes:
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
Mar 17 2012
next sibling parent "F i L" <witte2008 gmail.com> writes:
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?
Mar 17 2012
prev sibling next sibling parent "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
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
Mar 17 2012
prev sibling next sibling parent "F i L" <witte2008 gmail.com> writes:
H. S. Teoh wrote:
 It's already checked into git. So it will be in 2.059 for sure.

Great!
Mar 18 2012
prev sibling next sibling parent reply Dmitry Olshansky <dmitry.olsh gmail.com> writes:
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
Mar 18 2012
parent Dmitry Olshansky <dmitry.olsh gmail.com> writes:
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;

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
Mar 18 2012
prev sibling parent "David Nadlinger" <see klickverbot.at> writes:
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;

no '=' anywhere in sight. UFCS is indeed nice.

Calling parameterless functions without parens? David
Mar 18 2012