D scripting in D

Mike B Johnson via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jun 1 20:12:08 PDT 2017


On Friday, 2 June 2017 at 02:39:47 UTC, Stefan Koch wrote:
> On Friday, 2 June 2017 at 02:32:43 UTC, Mike B Johnson wrote:
>> 1. change test12.wav to test123.wav
>> 2. save file
>> 3. recompile.
>> 4. run
>> 5. Get back to same test point(could be a lot or a little 
>> amount of work).
>
> If that is all you want; then compile your code into a dll/so 
> and load the new version.
> The D compiler is fast enough that it will not break your flow.
>
> program-state management would be taken by the static part of 
> your program.

I thought about that but the state management would not be 
trivial and would prevent recompilation in most cases(because the 
state would not exist in the same format in recompiled version).  
While it is possible, it doesn't seem like the way to go(and not 
only that, one doesn't get all the benefits a scripting language 
has(sandboxing, jit, etc).

We can come up with alternatives all day long but it will never 
fulfill the role...




More information about the Digitalmars-d-learn mailing list