repl like interface with D app
Mike B Johnson via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Jun 16 00:57:46 PDT 2017
I am developing a D app and I have a need to test things out. I
do not want to have to recompile the app every time I want to
test some functionality out.
Suppose I have an app with some functions like foo, bar, etc...
in some module m.
I would like to be able to do basic stuff like
> writeln(m.foo());
or
> auto x = m.bar() + 3;
etc...
This way I can write the functions, compile, then test them out
without compiling.
e.g.,
> m.FlipLightSwitch(34);
which turns on the 34th light in the house, then
> m.FlipLightSwitch(34);
which turns it off. This should take about 1-2 seconds to test
RATHER than about 1m to do the compilation, running, etc.
Having a history buffer would be nice too and even a debugger
showing the basic state(nothing fancy).
Anything like this out there. Lua has things like this that are
very nice to do because they allow for quick testing and
prototyping.
More information about the Digitalmars-d-learn
mailing list