std.unittests for (final?) review
Tomek Sowiński
just at ask.me
Thu Jan 6 12:59:51 PST 2011
Andrei Alexandrescu napisał:
> * Remove assertCmp and fold it into assertPredicate. With trivial
> metaprogramming you can distinguish an operator from an actual expression.
>
> assertPredicate!"<"(1 + 1, 2.1);
If it's trivial, put it into binaryFun, so that everyone else can reap rewards:
sort!">"(range);
auto sum = reduce!"+"(range);
As for operator-only unaryFuns, don't; they bring more confusion than benefit.
--
Tomek
More information about the Digitalmars-d
mailing list