How to use UFCS and std.algorithm.sort?

2015-03-10 Thread Andre via Digitalmars-d-learn
Hi, with the new beta I get the warning I should use std.algorithm.sort instead the .sort property. I thought the std.algorithm.sort method is used in this example? void main() { import std.algorithm: sort, uniq, map; import std.array: array; string[] a

Re: How to use UFCS and std.algorithm.sort?

2015-03-10 Thread Tobias Pankrath via Digitalmars-d-learn
.array .sort buildin arrays have a .sort-property that is called.

Re: How to use UFCS and std.algorithm.sort?

2015-03-10 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, March 10, 2015 07:24:52 Andre via Digitalmars-d-learn wrote: > Hi, > > with the new beta I get the warning I should use > std.algorithm.sort instead the .sort property. I thought the > std.algorithm.sort method is used in this example? > > void main() > { > import std.algorithm: sort,

Re: How to use UFCS and std.algorithm.sort?

2015-03-10 Thread Andre via Digitalmars-d-learn
Thanks a lot! Kind regards André On Tuesday, 10 March 2015 at 08:40:28 UTC, Jonathan M Davis wrote: On Tuesday, March 10, 2015 07:24:52 Andre via Digitalmars-d-learn wrote: Hi, with the new beta I get the warning I should use std.algorithm.sort instead the .sort property. I thought the std.al

Re: How to use UFCS and std.algorithm.sort?

2015-03-12 Thread Ali Çehreli via Digitalmars-d-learn
On 03/10/2015 01:40 AM, Jonathan M Davis via Digitalmars-d-learn wrote: .sort on an array is going to use the built-in sort property. You need to use parens if you want to use the function in std.algorithm with an array and UFCS, e.g. arr.sort(); Didn't know that. Nice! Another option is to