What is "stringImportPaths"

Ali Çehreli acehreli at yahoo.com
Fri Dec 8 21:03:46 UTC 2017


On 12/08/2017 12:10 PM, mrphobby wrote:

 > I still think using the word "import" is confusing. Would rather have it
 > called "load" or something. But at least I understand it now :)

We don't want any more keywords. :) (D's keywords are context-independent.)

An unfortunate example was the "body", which is on its way out of being 
a keyword. Instead, the "do" keyword is overloaded to take "body"s 
responsibility:

int foo(int i)
in {
     assert(i < 100);
} out(result) {
     assert(result > i);
} do {
     auto body = i + 7;    // YAY! :)
     return body;
}

void main() {
     foo(42);
}

Of course the same can be said about any other keyword but life is not 
fair. :)

Ali



More information about the Digitalmars-d-learn mailing list