Talk on what a systems programming language needs to replace C

Laeeth Isharc laeeth at kaleidic.io
Thu Sep 5 00:08:49 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.

Yes - it's not difficult.  It's just that with quite a few things 
it's a matter of how much you can bite off at once and also 
continued maintenance cost.  So if there's a good library for it 
then what might be just beyond what's possible becomes possible.



More information about the Digitalmars-d mailing list