Talk on what a systems programming language needs to replace C

Bastiaan Veelo Bastiaan at Veelo.net
Wed Sep 4 20:01:50 UTC 2019


On Tuesday, 3 September 2019 at 22:44:08 UTC, Adam D. Ruppe wrote:
> On Tuesday, 3 September 2019 at 22:37:04 UTC, Laeeth Isharc 
> wrote:
>> I'm not sure whether it would be better to construct a parse 
>> tree or AST for this purpose but eg with DPP my personal sense 
>> is it would be useful to have a way to generate D code at a 
>> more abstract level than strings.
>
> You can always build an AST in objects, then 
> mixin(that_tree.toString()); and let CTFE translate it over. I 
> have used this with various DSL type things in D before, and 
> you could (in theory anyway) do the same thing with full D as 
> well.

In action: https://youtu.be/HvunD0ZJqiA?t=1216

(shameless plug)

Bastiaan.


More information about the Digitalmars-d mailing list