On Sunday, 13 July 2014 at 16:02:05 UTC, Dragos Carp wrote:
I am kind of fine both ways, it is not that big deal but I
remember being very surprised that most common use case is
called `logf` and much less common - `log`. For `write`
function family common usage pattern is a bit different.
If we get rid of the write style variant, then you need to
remember just one name with 4 overloads:
log(string message);
log(string format, Args...);
log(bool condition, string message);
log(bool condition, string format, Args...);
It had that, it was to little for users.
This is a library: you can always add names, but it is very hard
to remove them. If next version of std.logger should support
something like logFirstN or logEveryN (ideas from Google log
library). How this should look like? logfnf, logenf...?
c++ does not have foreach(i; 1 .. n)