<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Thanks for the review, Kelvin.<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Dec 20, 2017, at 8:52 PM, Kelvin Ma via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class=""><div class="gmail_extra"><div class="gmail_quote"><div class="">it makes sense to have<span class="Apple-converted-space"> </span><span style="font-family: monospace, monospace;" class="">@abiPublic</span><span class="Apple-converted-space"> </span>on<span class="Apple-converted-space"> </span><span style="font-family: monospace, monospace;" class="">private</span><span class="Apple-converted-space"> </span>and<span class="Apple-converted-space"> </span><span style="font-family: monospace, monospace;" class="">fileprivate</span><span class="Apple-converted-space"> </span>declarations too and i hope this gets added, because<span class="Apple-converted-space"> </span><span style="font-family: monospace, monospace;" class="">private</span><span class="Apple-converted-space"> </span>and<span class="Apple-converted-space"> </span><span style="font-family: monospace, monospace;" class="">fileprivate</span><span class="Apple-converted-space"> </span>are tools for code organization and maintenance,, the compiler with wmo doesn’t care about<span class="Apple-converted-space"> </span><span style="font-family: monospace, monospace;" class="">private</span><span class="Apple-converted-space"> </span>vs<span class="Apple-converted-space"> </span><span style="font-family: monospace, monospace;" class="">internal</span>. but<span class="Apple-converted-space"> </span><span style="font-family: monospace, monospace;" class="">@abiPublic private</span><span class="Apple-converted-space"> </span>is bound to cause confusion and it just reads funny.<span class="Apple-converted-space"> </span><br class=""></div></div></div></div></div></div></blockquote><div><br class=""></div>From an implementation standpoint, it would be a simple change to allow @abiPublic on private and fileprivate declarations. However, I think that introduce some confusion. Recall that the mangling of private symbols includes the source file name. This would now be part of your framework’s ABI. If you moved the @abiPublic function to another source file, or rename the source file, you will break ABI.</div><div><br class=""></div><div>Another approach would be to change the mangling so that @abiPublic private symbols are mangled like internal symbols, with a module name and no source file name. This makes for a simpler ABI. However this also has a downside, because now if you define two @abiPublic private functions in different files that have the same mangling, you will get a linker error and not a nice compiler diagnostic.</div><div><br class=""></div><div>Note that nothing in this proposal precludes @abiPublic from being applied to private and fileprivate symbols though. If we figure out a nice solution to the above problems, we could generalize @abiPublic without any issues.</div><div><br class=""></div><div>Slava</div><br class=""></body></html>