DLF September 2023 Monthly Meeting Summary

RazvanN razvan.nitu1305 at gmail.com
Mon Nov 13 10:01:23 UTC 2023


On Sunday, 12 November 2023 at 21:55:31 UTC, Paul Backus wrote:
> On Sunday, 12 November 2023 at 19:50:02 UTC, Mike Parker wrote:
>> https://gist.github.com/mdparker/f28c9ae64f096cd06db6b987318cc581
>
>> There was a side discussion about how the `extern(C++)` 
>> interface affects dmd-as-a-library.
>
> Personally, my number-one complaint with dmd-as-a-library is 
> that I am forced to use `extern(C++)` when creating my own 
> `Visitor` classes.
>
> In [`dmdtags`][1], this requirement has made it necessary for 
> me to implement my own C++-compatible [`Span`][2] and 
> [`Appender`][3] types, just to avoid the C++ mangling errors 
> caused by D's built-in `T[]` slices.
>
> I have no use for overriding AST nodes, but the ability to use 
> `extern(D)` visitors with dmd-as-a-library would be a welcome 
> improvement.
>
> [1]: https://code.dlang.org/packages/dmdtags
> [2]: 
> https://github.com/pbackus/dmdtags/blob/v1.1.1/src/dmdtags/span.d
> [3]: 
> https://github.com/pbackus/dmdtags/blob/v1.1.1/src/dmdtags/appender.d

I have already brought that up to one of our work group meetings 
regarding dmd as a library as I have stumbled upon this also. We 
have a solution for this, I'm going to try to implement it this 
week.

RazvanN


More information about the Digitalmars-d-announce mailing list