1) Yes / No for inclusion into std.experimental

Yes

2) Yes / No for inclusion into Phobos in its current state

No

3) If you have answered "No" for (2) : list of mandatory changes that are needed to make you vote "Yes"

I can't say Yes until I've actually used it.

4) Any additional comments for author.

None for the author as I detailed my concerns in Github, though I should apologize for being very lax about participating (RL has been busy). However, I wanted to address the suffix notation as I suggested it. What I was going for was consistency with the write/writef method signatures to keep things consistent. I felt it would be good to make the two similar since they do similar things.

My suggestion for conditional versions, logc and logcf, I believe are the ones causing some heartburn. If you look at how write works, what does this mean?

    write(a < b, "some message");

Am I writing conditionally or am I writing out something like "truesome message"? In phobos, it is the latter. To have consistency, we can't simply make the first parameter be a condition as it would prevent us from doing something like this:

    log(canFind("foobar", "bar"));

Second, the way I look at it, you can read the methods like this:

    write - write
    writef - write formatted
    log - log
    logf - log formatted
    logc - log conditionally
    logcf - log conditionally and formatted

Having that english-like meaning I think will make it easier to recognize what's being done.

tl;dr I proposed having the log interface consistent with the write interface (from a parameter standpoint) and suggested the "c" suffix to make it clear that conditional logging is being performed vs. the first parameter being a boolean that's part of the log message.

Reply via email to