[swift-evolution] [swift-corelibs-dev] Proposal: add `noescape` attribute to public API (particularly libdispatch)
Pierre Habouzit
phabouzit at apple.com
Sat Dec 5 15:50:07 CST 2015
> On Dec 5, 2015, at 1:44 PM, Jacob Bandes-Storch via swift-evolution <swift-evolution at swift.org> wrote:
>
> One option was to use the API notes feature of the compiler to annotate these APIs as part of the import into Swift. Another is to get the C headers changed (on Darwin too) to add the attribute. We may want to do one approach in the short term and another in the long term.
>
> I've been operating under the assumption that __attribute__((noescape)) will eventually be deeply understood by clang, and allow the same elision of "self" in Objective-C that @noescape does in Swift. (I filed <rdar://19914650> for this some time ago.)
>
> Thus, I think it makes the most sense to change the C headers.
I completely agree with that statement, and I think that this change should make it into Darwin and swift-corelibs-libdispatch both.
-Pierre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151205/7b5665e2/attachment.html>
More information about the swift-evolution
mailing list