July 30, 2014
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
July 30, 2014
On Wednesday, 30 July 2014 at 14:59:38 UTC, Andrei Alexandrescu wrote:
> Such logic doesn't apply to vocabularies.

According to my vocabulary, a logger is something that logs. Didn't hear about irater, and messer sounds like a German word.
July 30, 2014
On 7/30/14, 8:16 AM, Kagamin wrote:
> On Wednesday, 30 July 2014 at 14:59:38 UTC, Andrei Alexandrescu wrote:
>> Such logic doesn't apply to vocabularies.
>
> According to my vocabulary, a logger is something that logs. Didn't hear
> about irater, and messer sounds like a German word.

Yah but the log object, i.e. the thing you log things in (the paper log on a ship etc) is "a log", not "a logger". A "logger" would be the person writing into the log.

So the appropriate name for the default log object is "defaultLog" not "defaultLogger", or "stdlog" not "stdlogger". The better choice is also shorter.


Andrei

July 30, 2014
"Andrei Alexandrescu"  wrote in message news:lrb8dj$4cn$1@digitalmars.com...

> Yah but the log object, i.e. the thing you log things in (the paper log on a ship etc) is "a log", not "a logger". A "logger" would be the person writing into the log.
>
> So the appropriate name for the default log object is "defaultLog" not "defaultLogger", or "stdlog" not "stdlogger". The better choice is also shorter.

But the default log object is the tool you use to write things into the log! It's the secretary you yell things at from the other room, who then writes them down in the actual log (or logs (or nowhere)). 

July 30, 2014
On Wednesday, 30 July 2014 at 17:01:39 UTC, Andrei Alexandrescu wrote:
> So the appropriate name for the default log object is "defaultLog" not "defaultLogger", or "stdlog" not "stdlogger". The better choice is also shorter.

I'm not going to join a discussion about the finer details of applying logic to natural language or the applicability of anthropomorphic analogies to log(ging forests of) messages, but let me point out that you should probably also argue for std.logger -> std.log and XyzLogger -> XyxLog to keep the names consistent.

Cheers,
David
July 30, 2014
On Wednesday, 30 July 2014 at 14:59:38 UTC, Andrei Alexandrescu wrote:
> On 7/30/14, 2:22 AM, "Marc Schütz" <schuetzm@gmx.net>" wrote:
>> On Tuesday, 29 July 2014 at 23:09:28 UTC, Robert burner Schadek wrote:
>>> On Tuesday, 29 July 2014 at 06:09:25 UTC, Andrei Alexandrescu wrote:
>>>> 4. Replace defaultLogger with theLog. "Logger" is a word, but one
>>>> that means "lumberjack" so it doesn't have the appropriate semantics.
>>>> The use is generally acceptable as a nice play on words and as a
>>>> disambiguator between the verb "to log" and the noun "log". When we
>>>> actually want to talk about the current log in an application, we
>>>> should, however, call it "the log". This is negotiable.
>>>
>>> I really don't care how a global Logger instance is called. Anyone
>>> else has an opinion on this? Otherwise Andrei wins.
>>
>> I don't see anything wrong with "logger". A "driver" is something that
>> drives (a device), a "logger" is something that logs.
>
> Such logic doesn't apply to vocabularies. Is an "irater" someone who irates, a "messer" someone who creates a mess etc?

Yes. It's called "derivation" in linguistics. It works in this case, because "-er" is a semi-productive suffix, which produces new nouns (called "nomina agentis") that refer to the "do-er", i.e. either a person, like the other meaning of "logger", or a tool, e.g. "box cutter". It is semi-productive, because as you noted, some derivations indeed sound odd and are almost never used.

But this is getting way off-topic. My main point is that it's easy to understand, and it has lots of precedence in other software.
July 30, 2014
On Wednesday, 30 July 2014 at 17:01:39 UTC, Andrei Alexandrescu wrote:
> On 7/30/14, 8:16 AM, Kagamin wrote:
>> On Wednesday, 30 July 2014 at 14:59:38 UTC, Andrei Alexandrescu wrote:
>>> Such logic doesn't apply to vocabularies.
>>
>> According to my vocabulary, a logger is something that logs. Didn't hear
>> about irater, and messer sounds like a German word.
>
> Yah but the log object, i.e. the thing you log things in (the paper log on a ship etc) is "a log", not "a logger". A "logger" would be the person writing into the log.
>
> So the appropriate name for the default log object is "defaultLog" not "defaultLogger", or "stdlog" not "stdlogger". The better choice is also shorter.
>
>
> Andrei

Even shorter would be "log".
That would be better than enabling

    log.info(...);

via the already proposed

    import log = std.logger;

The only obstacle is the current "log" function.
But do we really need the free log functions? For UFCS?

Otherwise

    alias info = log.info;

would do the trick.
July 30, 2014
On 7/30/14, 10:13 AM, Daniel Murphy wrote:
> "Andrei Alexandrescu"  wrote in message
> news:lrb8dj$4cn$1@digitalmars.com...
>
>> Yah but the log object, i.e. the thing you log things in (the paper
>> log on a ship etc) is "a log", not "a logger". A "logger" would be the
>> person writing into the log.
>>
>> So the appropriate name for the default log object is "defaultLog" not
>> "defaultLogger", or "stdlog" not "stdlogger". The better choice is
>> also shorter.
>
> But the default log object is the tool you use to write things into the
> log! It's the secretary you yell things at from the other room, who then
> writes them down in the actual log (or logs (or nowhere)).

No, the way I see it is myLog.write("stuff"), i.e. it's me, the caller, who is doing the logging (i.e. I'm the logger), and myLog is the object of the action. Granted, things could be interpreted as in "I tell the logger to carry writing into some other log" but that becomes pop philosophy. By Occam's rule, just call the object a log, not a logger. -- Andrei
July 30, 2014
On 7/30/14, 10:50 AM, linkrope wrote:
> On Wednesday, 30 July 2014 at 17:01:39 UTC, Andrei Alexandrescu wrote:
>> On 7/30/14, 8:16 AM, Kagamin wrote:
>>> On Wednesday, 30 July 2014 at 14:59:38 UTC, Andrei Alexandrescu wrote:
>>>> Such logic doesn't apply to vocabularies.
>>>
>>> According to my vocabulary, a logger is something that logs. Didn't hear
>>> about irater, and messer sounds like a German word.
>>
>> Yah but the log object, i.e. the thing you log things in (the paper
>> log on a ship etc) is "a log", not "a logger". A "logger" would be the
>> person writing into the log.
>>
>> So the appropriate name for the default log object is "defaultLog" not
>> "defaultLogger", or "stdlog" not "stdlogger". The better choice is
>> also shorter.
>>
>>
>> Andrei
>
> Even shorter would be "log".
> That would be better than enabling
>
>      log.info(...);
>
> via the already proposed
>
>      import log = std.logger;
>
> The only obstacle is the current "log" function.
> But do we really need the free log functions? For UFCS?
>
> Otherwise
>
>      alias info = log.info;
>
> would do the trick.

But here we're discussing the name of the default log object... -- Andrei
July 30, 2014
"Andrei Alexandrescu"  wrote in message news:lrbc50$78i$1@digitalmars.com...

> No, the way I see it is myLog.write("stuff"), i.e. it's me, the caller, who is doing the logging (i.e. I'm the logger), and myLog is the object of the action. Granted, things could be interpreted as in "I tell the logger to carry writing into some other log" but that becomes pop philosophy. By Occam's rule, just call the object a log, not a logger.

It's subjective either way.  Isn't language fun!