debugger blues
Alex Parrill via Digitalmars-d
digitalmars-d at puremagic.com
Fri Apr 1 18:13:54 PDT 2016
Comparing a logging framework with a basic print function is not
a fair comparison. I'd like to point out that Python's logging
module[1] also takes format strings.
So this really is just an argument of D's writeln vs Python's
print. In which case, this seems like a small thing to get upset
over. Yes, implicit spacing is convenient, but in some cases it
isn't. It's a fairly arbitrary choice. I'd argue that D's writeln
follows Python's philosophy of "Explicit is better than implicit"
better than Python does.
But it's not overly hard to implement your own print function:
void print(Args...)(Args args) {
foreach(i, arg; args) {
if(i != 0) write(" ");
write(arg);
}
writeln();
}
[1] https://docs.python.org/3/library/logging.html
More information about the Digitalmars-d
mailing list