Binary/Unary Functors for Sorting/Finding (C++)?
Just a general preference question; when using a functor/function pointer to sort or find elements in a list, would you rather the functor argument be binary (i.e. take 2 arguments and return true/false for less than/equal), or would you rather the functor argument be unary (i.e. take one argument, return another argument, and let the sort/find function do the comparison)?
Code:
struct Structure ta0kira |
Binary it is! I really had this decided in my head before I posted, but I was really just looking for objectors. This was a simple change to make, and I think it was better to change it early on. I just posted the updated version of the lib (0.10.0):
http://sourceforge.net/projects/clist-ta0kira/ Thanks for your input and interest. ta0kira |
All times are GMT -5. The time now is 02:36 PM. |