More optional parens concerns
Jonathan M Davis via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Jun 24 02:40:44 PDT 2017
On Saturday, June 24, 2017 9:56:55 AM MDT Russel Winder via Digitalmars-d-
learn wrote:
> I note that:
>
> x.map!(…).array.sort
>
> is not valid, you have to have the parentheses on sort:
>
> x.map!(…).array.sort()
>
> Why?
Because the built-in sort for arrays has been deprecated but not yet
removed. So, for now, calling sort on an array without parens calls the
built-in sort. Once the built-in sort has been removed, then this problem
will go away.
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list