On Wednesday, 30 July 2014 at 14:25:49 UTC, David Nadlinger wrote:
On a note less related to bikes, could anybody explain to me why a name is something natural to a logger? In other words, why does it make sense to complicate the entire design with this instead of just using either a set (in place of a map) in MultiLogger or at least keeping the whole name concept local to it?

Wow, upon further code review I discovered that Logger actually overrides opCmp/opEquals to be based on the name (?!). This leads to the following gem:

---
void main() {
   import std.logger.filelogger;
   auto a = new FileLogger("asdf", "w");
   auto b = new FileLogger("qwer", "w");
   assert(a == b); // WAT
}
---

Cheers,
David

Reply via email to