DLF September 2023 Monthly Meeting Summary
Paul Backus
snarwin at gmail.com
Sun Nov 12 21:55:31 UTC 2023
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
More information about the Digitalmars-d-announce
mailing list