<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><div style="direction: inherit;"><br></div><br>Sent from my iPhone</div><div><br>On 5 Sep 2016, at 20:01, Douglas Gregor &lt;<a href="mailto:dgregor@apple.com">dgregor@apple.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><div style="direction: inherit;"><br></div><br>Sent from my iPhone</div><div><br>On Sep 5, 2016, at 11:20 AM, Goffredo Marocchi &lt;<a href="mailto:panajev@gmail.com">panajev@gmail.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><div style="direction: inherit;"><br></div>Sent from my iPhone</div><div><br>On 5 Sep 2016, at 18:59, Douglas Gregor &lt;<a href="mailto:dgregor@apple.com">dgregor@apple.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><div style="direction: inherit;"><br></div><br>Sent from my iPhone</div><div><br>On Sep 4, 2016, at 11:48 PM, Goffredo Marocchi &lt;<a href="mailto:panajev@gmail.com">panajev@gmail.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><div style="direction: inherit;">Hey Doug,</div><div style="direction: inherit;"><br></div><div style="direction: inherit;">How do I use it in Swift code without a wrapper, which is understandably a bit pointless, if I still support iOS 9?</div></div></div></blockquote><div style="direction: inherit;"><br></div><div style="direction: inherit;">#if or a wrapper are your best options.&nbsp;</div><div style="direction: inherit;"><br></div></div></blockquote><div style="direction: inherit;"><br></div><div style="direction: inherit;">This is confusing to me as the WWDC talk they specifically said not to use wrappers as it would pick up the wrong context </div></div></blockquote><div style="direction: inherit;"><br></div><div style="direction: inherit;">Ah, right. I forgot about that.&nbsp;</div><div style="direction: inherit;"><br></div><blockquote type="cite"><div><div style="direction: inherit;">and using the #if directive at every call site would make for a lot of repeated code... hard to use.</div></div></blockquote><div style="direction: inherit;"><br></div><div style="direction: inherit;">Yes, using #if can be boilerplate-y here.&nbsp;</div><div style="direction: inherit;"><br></div></div></blockquote><div style="direction: inherit;"><br></div><div style="direction: inherit;">Oh well, if it cannot be helped there is an area I will have to butt heads in code reviews...</div><div style="direction: inherit;"><br></div><blockquote type="cite"><div><blockquote type="cite"><div><div style="direction: inherit;">It would be good if macro support for Swift landed in the not too distant future as cases like this make its lack of sorely missed.</div></div></blockquote><div style="direction: inherit;"><br></div><div style="direction: inherit;">Macro support is not likely to be a priority for &nbsp;quite a while.&nbsp;</div></div></blockquote><div style="direction: inherit;"><br></div><div style="direction: inherit;">I hope you will not find it too impolite, but this feels like a more dogmatic decision than I would like. I agree that macro's do not feel pure, but they allow you to adapt to some of the ugliness of real world use cases (the fact that Swift forces people to write a lot of boilerplate or to give up on this pushes people that support iOS9 and want to go full Swift to drop the idea of using os_log... do we rather have that than compromise slightly on purity perhaps?). Sorry for the long aside, but maybe shedding all the C part of Objective-C did hurt a bit the ease of adaptation.&nbsp;</div><div style="direction: inherit;"><br></div><div style="direction: inherit;">Very few people can go iOS 10+ only and I do find a lot of great value in the new logging system and Objective-C allows me to use it a lot sooner thanks to macro support.</div><div style="direction: inherit;"><br></div><blockquote type="cite"><div><div style="direction: inherit;"><br></div><div style="direction: inherit;">&nbsp; - Doug</div><div style="direction: inherit;"><br></div><blockquote type="cite"><div><div style="direction: inherit;"><br></div><blockquote type="cite"><div><div style="direction: inherit;">&nbsp; - Doug</div><div style="direction: inherit;"><br></div><blockquote type="cite"><div><div><br>Sent from my iPhone</div><div><br>On 5 Sep 2016, at 05:05, Brandon Knope via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><div style="direction: inherit;">Where should the lack of {public} be reported then?</div><div style="direction: inherit;"><br></div><div style="direction: inherit;">This seems like it falls under jira and not radar because it's in swift open source but I'm not 100 percent&nbsp;</div><div style="direction: inherit;"><br></div><div style="direction: inherit;">Brandon&nbsp;</div><br>Sent from my iPad</div><div><br>On Sep 4, 2016, at 11:48 PM, Douglas Gregor &lt;<a href="mailto:dgregor@apple.com">dgregor@apple.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><div style="direction: inherit;"><br></div><br>Sent from my iPhone</div><div><br>On Sep 3, 2016, at 11:32 AM, Ben Rimmington via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><br class=""><div><blockquote type="cite" class=""><div class="">On 3 Sep 2016, at 19:13, Brandon Knope &lt;<a href="mailto:bknope@me.com" class="">bknope@me.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; direction: inherit;" class="">Thank you! I was looking for this last night and failed.&nbsp;</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; direction: inherit;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; direction: inherit;" class="">Why do you think {public} isn't included?</div></div></blockquote></div><br class=""><div class=""><div class="">I don't know, but trying to reimplement <font color="#3e1e81" class="">__builtin_os_log_format</font> in the overlay seems wrong. It would be better to have a variant of <font color="#3e1e81" class="">__builtin_os_log_format</font> which takes a <font color="#703daa" class="">va_list</font>.</div></div></div></blockquote><div style="direction: inherit;"><br></div><div style="direction: inherit;"><br></div><div style="direction: inherit;">__builtin_os_log_format is implemented by Clang, not a library, and is quite involved. Implementing os_log in an overlay to provide near feature-compatibility with the C API is the right approach for Swift 3, where a more comprehensive solution (say, a general logging API based on string interpolation or similar) is way out of scope.&nbsp;</div><div style="direction: inherit;"><br></div><div style="direction: inherit;">&nbsp; - Doug</div><div style="direction: inherit;"><br></div><div style="direction: inherit;"><br></div><blockquote type="cite"><div><div class=""><div class=""><br class=""></div><div class="">-- Ben</div></div><div class=""><br class=""></div></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-evolution mailing list</span><br><span><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></div></blockquote></div></blockquote></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-evolution mailing list</span><br><span><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></div></blockquote></div></blockquote></div></blockquote></div></blockquote></div></blockquote></body></html>