conver BigInt to string

TheGag96 via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Nov 5 12:45:44 PST 2015


On Thursday, 5 November 2015 at 16:45:10 UTC, Meta wrote:
> The second issue is that using .sort instead of .sort() (note 
> the parentheses) calls the built-in sort instead of 
> std.algorithm.sort, which is strongly discouraged. You should 
> always use std.algorithm.sort over the built-in sort, which you 
> can do just by appending those parentheses.

Whoa whoa whoa... This is the first time I've heard about this 
difference, and I've used .sort plenty of times... That seems 
like really, REALLY bad design, especially considering the 
language allows functions to be called without parentheses. I 
thought I was using std.algorithm's version the whole time.

What's the difference between the implementations of arrays' 
.sort property and std.algorithm.sort()? And does sort() throw 
out that "unable to deduce function argument" error for a 
character array of all things?



More information about the Digitalmars-d-learn mailing list