5 ms·
> Swift 6.3 introduces the @c attribute, which lets you expose Swift functions and enums to C code in your project. Annotating a function or enum with @c prompt
by sirwhinesalot 7mo ago
> Swift 6.3 introduces the @c attribute, which lets you expose Swift functions and enums to C code in your project. Annotating a function or enum with @c prompts Swift to include a corresponding declaration in the generated C header that you can include in your C/C++ files
Why did this take so long to be added? Such strange priorities. Adding an entire C++ compiler for C++ interoperability before adding... C exports. Bizarre.
- saagarjha 7mo agoThey had it earlier, as an underscored attribute.
- hrmtst93837 7mo ago[flagged]
- asimovDev 7mo agoit's been there for a while as an experimental feature. I used it in a project
- dagmx 7mo agoYou already had ObjC export so it was arguably low priority given the crossover