On 5/25/11 10:50 AM, Jose Armando Garcia wrote:
On Wed, May 25, 2011 at 11:46 AM, KennyTM~<kenn...@gmail.com>  wrote:
On May 25, 11 22:23, Matthew Ong wrote:

On 5/25/2011 9:45 PM, Daniel Gibson wrote:


  >.stringof[7 .. $]
Belonging to which object or variable?

Belongs to the module. '.xxx' is D's syntax for access a global object
(derived from C++'s '::xxx' syntax). Please read through the whole D
specification.

(Frankly speaking this is a DMD-specific hack as the spec has never required
that the .stringof of a module must return "module foo.bar.baz".)


Is this evaluated at compile time? I prefer to use this for std.log
over __FILE__ when filtering verbose log messages. The user is more
likely to remember the module name and not the file name.

It is. Probably it's a good idea to use module name, which is unique across an application, unlike the (directory-less) file name.

Andrei

Reply via email to