On 30/05/2011 20:08, Andrei Alexandrescu wrote:
On 05/30/2011 01:02 PM, Walter Bright wrote:
On 5/30/2011 9:59 AM, Jose Armando Garcia wrote:
Walter, what do you think about adding __MODULE__ to the language? It
will work similar to __FILE__ and __LINE__ but instead get replaced by
the name of the module. This would be really useful for std.log's
verbosity filtering feature.

I don't know. I know I am leery of just adding more and more stuff like
this.

Gnu's and subsequently C++0x's experience with __FUNCTION__ and
__PRETTY_FUNCTION__ has shown that the effects are beneficial.


Andrei

Pull request #75 adds __traits(moduleOf) which allows you to get the module/package of a given symbol - I figure adding a trait is better than adding more ugly __FOOBAR__ nonsense (not that __traits() is the nicest syntax of course ;)).

--
Robert
http://octarineparrot.com/

Reply via email to