qsort_r argument order

Dustin Lang dstn@cs.toronto.edu
Wed Dec 3 16:56:00 GMT 2008


Hi,

> But looking at the BSD version, it couldn't be designed worse. Passing 
> the caller provided argument as first instead of 3rd argument means that 
> e.g. you have to have 2 implementations of qsort*.

Yes, sometimes compatibility comes at a price.

>From my perspective as a general unix developer, the relevant point is 
that qsort_r is now difficult to use in my code.  I may even just end up 
shipping my own version whose interface I can depend on, so all that 
clever design work may have been for nothing.

cheers,
dustin.



More information about the Libc-alpha mailing list