On Tuesday, 18 March 2014 at 23:05:51 UTC, bearophile wrote:
Chris Williams:
I could put a wrapper around the calls to these functions that
performs this action, but I figured a little macro would be
sufficient for my needs (it's just a little script.)
I suggest to keep the code simpler.
Bye,
bearophile
I could. I could simply allow the current working directory to
drift as the application performs operations, but I prefer the
consistency of knowing that methods I call restore state before I
continue to the next method. I sense that in the long run it will
make life easier.
But I also like to know how most-effectively to write a C-style
macro in D, so it seemed worth checking what the state of the art
is.