On 2012-03-06 08:54, Jonathan M Davis wrote:
On Tuesday, March 06, 2012 08:46:14 Jacob Carlborg wrote:
On 2012-03-06 02:32, Jonathan M Davis wrote:
On Tuesday, March 06, 2012 02:22:05 so wrote:
That is not a counter-argument to something related to this
library but everything that lies in global namespace.
At its first state both severity levels and the "log" was in
global namespace. Now only severity levels.
You are also overlooking one crucial fact that this library will
be part of phobos, standard library. Which requires everyone to
adopt. When you see codes like this (below), you don't blame
standard library designers do you?
using namespace std;
int cout;
Except that cout is not exactly something that would be considered a
normal
variable name. Something like info _is_. This logging module is taking
incredibly common names and shoving them as far into the global namespace
as anything can go in D which isn't a compiler built-in. _Not_ a good
idea IMHO - not without good reason. And I really don't think that this
merits it. log!info(msg) would work just fine and would be _far_ better.
- Jonathan M Davis
The user can then alias "log!info" to "info" if he/she wants to.
The user can do whatever aliases they want. It's just that we shouldn't
unnecessarily use really common names at the top level, since then they'll
conflict with a lot of stuff.
- Jonathan M Davis
What I'm trying so say is that if we use the template function the user
can get the best of both worlds.
--
/Jacob Carlborg