DMD as a library package can now run through all semantic phases

EntangledQuanta EQ at universe.com
Tue Jan 30 04:21:15 UTC 2018


On Tuesday, 30 January 2018 at 02:04:30 UTC, H. S. Teoh wrote:
> On Tue, Jan 30, 2018 at 01:20:02AM +0000, Bastiaan Veelo via 
> Digitalmars-d wrote:
>> On Tuesday, 30 January 2018 at 00:21:09 UTC, Amorphorious 
>> wrote:
>> > Just curious what the point is and what box it opens.
>> 
>> Better tooling is what comes to my mind. Imagine your editor 
>> to understand your code as good as the compiler itself. I 
>> assume this is the primary motivation.
>
> Being able to compile D code in your program (i.e., have an 
> embedded D compiler) is also nice for JIT applications.  E.g., 
> fill in a code template with runtime-determined parameters, 
> compile it, and run it at native execution speed.
>
>
> T

and can it do this? I didn't see anything in the docs that show 
that it can be used for "scripting", so to speak. Just seemed to 
be used for semantic analysis and pretty printing. Are these 
future plans or are they meant to be used as part of simply 
compiling D code with externally using a dmd compiler bundled 
with the app(which can already be done)?

It would be really cool to be able to create D scripts in an 
application directly using a "library" solution. I hope though 
all can be independent of the GC and OS. I'd like to use it for 
embedded solutions.


More information about the Digitalmars-d mailing list