On Monday, 8 April 2019 at 19:05:33 UTC, Julian wrote:
Shorter:
  string root_dir() {
      static string cache;
      return cache ? cache : (cache = dirName(thisExePath()));
  }
This might spam readlink() syscalls if they somehow return the

It's really not possible to call functions in modules like in any other languages? :S

---------------------------------------------------------------
import std.file;
import std.path;
import std.stdio;

//const ROOT_DIR = dirName(thisExePath());
int someInt = 0;
string someString = "sfgsdgdf";
writeln("one");

void main(){
        writeln("two");
}
---------------------------------------------------------------

Reply via email to