Objective C protocols
Guillaume Piolat
firstname.lastname at gmail.com
Sun May 17 11:00:44 UTC 2020
On Saturday, 16 May 2020 at 19:14:51 UTC, John Colvin wrote:
> What's the best way to implement an Objective C protocol in D?
>
> I see mention here
> https://dlang.org/changelog/2.085.0.html#4_deprecated_objc_interfaces but it's not clear where things are these days.
I did it throught the Obj-C runtime a while ago:
https://github.com/AuburnSounds/Dplug/blob/dda1f80d69e8bfd4af0271721738ce827c2f0eae/au/dplug/au/cocoaviewfactory.d#L99
and the result is brittle, you need to replicate the protocol
declaration, add all methods etc.
More information about the Digitalmars-d-learn
mailing list