On Thursday, 15 December 2016 at 14:05:08 UTC, Andrey wrote:
In D, probably, I could write something like this:
void open(in string fileName) {...}

Yes, though remember that `in` does have a specific meaning (even though the compiler rarely enforces it): it means you promise not to modify it nor keep a reference to it.

So don't use `in` on anything you want to keep as a member or global variable, it is something you will just look at inside this function then let go.

Reply via email to