On Thursday, 12 June 2025 at 04:53:33 UTC, DanielG wrote:
Hijacking this thread a bit to ask a related question:
What's the overall feasibility of using pure D to rewrite a
not-too-large amount of Cocoa/AppKit code?
Is it just a matter of translating the headers via 'dstep' or
whatever? Does that work today, for something as complex as
AppKit? (Also I'd need Quartz2D and CoreText, but I'm assuming
those would be trivial since they have C APIs)
Should be decently feasible; though I am still working on
translating Apple API headers to D. I don’t personally think that
automatic translation is the way to go, as you miss out on good
inline documentation and the like. So I prefer to hand-write my
bindings. With the work I’m doing for Inochi2D I have started
writing these bindings. So in due time I plan to have most if not
all of the publicly documented Apple APIs available from D. Both
ones based on Foundation and CoreFoundation.
Additionally I recently added toll free bridging support to
objective-d as well; and plan to refine the helper system I wrote
around it.