early alpha of D REPL

extrawurst stephan at extrawurst.org
Tue Feb 11 00:49:54 PST 2014


On Tuesday, 11 February 2014 at 08:15:55 UTC, Martin Nowak wrote:
> On Tuesday, 11 February 2014 at 05:37:45 UTC, Andrei 
> Alexandrescu wrote:
>>>
>>> As I understand it, you are executing dmd in the background 
>>> to repl.
>>> Simple and clever :D
>>
>> But then how is it saving context?
>>
>> Andrie
>
> It's using shared libraries to do so. Each new deck/stmt/expr 
> is compiled in a shared library. This library imports and links 
> against all previous libraries to make the context available.
> I still need to implement a few rewrites, i.e. `auto var = 
> val;` should become `typeof(val) var; shared static this() { 
> var = val; }` too support runtime initialization.

Thats a nifty trick!


More information about the Digitalmars-d-announce mailing list