June 24, 2017 Re: More optional parens concerns | ||||
---|---|---|---|---|
| ||||
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
|
Copyright © 1999-2021 by the D Language Foundation