On Friday, 22 July 2016 at 14:02:03 UTC, Jonathan Marler wrote:
The __FILE__ trait seems to be used most useful for error
messages.
Another usage is for testing parsers or string functions directly
on the source. E.g in "devel" mode the main function
void main(string[] args)
{
version(devel)
{
// dont mess with params, use the text in source to catch
most simple bugs.
File f = File(__FILE__, "r");
}
else
{
// load using args
}
}
I could see him wanting it to be a relative path sometimes and
an absolute one other times. By redefining it to always be
absolute would solve this problem,
I'm for this, always absolute. Eventually forced by a new switch:
default behavior is not changed.