<p dir="ltr">Is the proposal going to improve support for &quot;c&quot; function import too, or is it limited to objective-c?</p>
<p dir="ltr">Im asking because there are currently some weaknesses in importing libs like glibc etc on linux, like the lack of support for functions with varadic arguments, ie ioctrl etc. Which requires any interfaces to said functions to have &quot;c&quot; wrappers built for them, before they can be imported. </p>
<div class="gmail_quote">On Jan 24, 2016 9:42 PM, &quot;plx via swift-evolution&quot; &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>My main reaction is the proposed translation is usually an improvement, but the proposal as-written is a bit hand-wavy on how to handle the situations where it doesn’t do a good job.</div><div><br></div><div>What I mean is, it is written from a perspective that comes across as “we have a solid-enough understanding of what Swift-y APIs should look like, and this proposal is sketching an automated approach to map Objective-C into that as best as possible; of course, in some cases the automated approach will be insufficient, and in those cases explicit annotations will be called for”.</div><div><br></div><div>But, as came up on the API guidelines discussion, there are parts of Objective-C for which there doesn’t seem to be any commonly-agreed-upon “Swift-y” equivalent; the delegate-style APIs are one such obvious case (and my motivating example), but there may be others once the enhanced translation starts seeing real use.</div><div><br></div><div>For such “problematic API styles” it’s not really going to be enough to say, for example, “we’ll add explicit annotations to deal with those”, because *what* those annotations *should be* doesn’t seem all that obvious right now; at least for the delegate-style APIs, even the enhanced translations are still wildly out of sync with the Swift API guidelines, and that style will either need to be grandfathered-in or some other form agreed-upon.</div><div><br></div><div>To make it concrete, here’s a few from the `UICollectionView*` family:</div><div><br></div><div>// IMHO an annoying inconsistency in how the type is incorporated into the 2nd argument’s label:</div><div><div>func collectionView(collectionView: UICollectionView, didEndDisplaying cell: UICollectionViewCell, forItemAt indexPath: IndexPath)<br>func collectionView(collectionView: UICollectionView, didEndDisplayingSupplementaryView view: UICollectionReusableView, forElementOfKind elementKind: String, at indexPath: IndexPath)</div></div><div><br></div><div>// IMHO an annoying inconsistency between the 2nd and 3rd argument labels:</div><div><div>func collectionView(collectionView: UICollectionView, targetIndexPathForMoveFromItemAt originalIndexPath: IndexPath, toProposedIndexPath proposedIndexPath: IndexPath) -&gt; IndexPath</div></div><div><br></div><div>// IMHO an annoying inconsistency vis-a-vis its 2nd and 3rd argument labels and those from the previous example:</div><div>func collectionView(collectionView: UICollectionView, moveItemAt sourceIndexPath: IndexPath, to destinationIndexPath: IndexPath)</div><div><br></div><div>…which I’d summarize by first reiterating that these are both:</div><div><br></div><div>- nowhere near in accord with the Swift API guidelines</div><div>- worse-off for being “partially translated” (the original APIs are verbose but predictable-and-mutually-consistent; these are verbose and neither predictable nor mutually-consistent)</div><div><br></div><div>I’m not sure what the right approach for the delegate APIs is — maybe they get grandfathered-in, maybe some Swift-ier form is chosen for them — but I think their presence shows a weakness of the *proposal* at this time: there are API territories for which there is as-yet no agreed-upon ideal translation to some Swift-ier form, and some more-explicit mention of such scenarios seems like it ought to go in the proposal (even if just in the future-steps section).</div><div><br></div><div>That’s my 2c at this time </div><div><br></div><div><blockquote type="cite"><div><br></div><div>On Jan 22, 2016, at 3:02 PM, Douglas Gregor via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><br><div><div style="word-wrap:break-word"><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;;font-size:16px;background-color:rgb(255,255,255)">Hello Swift community,</p><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;;font-size:16px;background-color:rgb(255,255,255)">The review of SE-0005&quot;Better Translation of Objective-C APIs Into Swift&quot; begins now and runs through January 31, 2016. The proposal is available here:</p><blockquote style="margin:0px 0px 16px;padding:0px 15px;border-left-width:4px;border-left-style:solid;border-left-color:rgb(221,221,221);background-color:rgb(255,255,255)"><div style="margin-top:0px;margin-bottom:0px"><font color="#777777" face="Helvetica Neue, Helvetica, Segoe UI, Arial, freesans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol" size="3"><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0005-objective-c-name-translation.md" target="_blank">https://github.com/apple/swift-evolution/blob/master/proposals/0005-objective-c-name-translation.md</a></font></div></blockquote><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;;font-size:16px;background-color:rgb(255,255,255)">Reviews are an important part of the Swift evolution process. All reviews should be sent to the swift-evolution mailing list at</p><blockquote style="margin:0px 0px 16px;padding:0px 15px;color:rgb(119,119,119);border-left-width:4px;border-left-style:solid;border-left-color:rgb(221,221,221);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;;font-size:16px;background-color:rgb(255,255,255)"><div style="margin-top:0px;margin-bottom:0px"><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" style="background-color:transparent;color:rgb(64,120,192);text-decoration:none" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a></div></blockquote><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;;font-size:16px;background-color:rgb(255,255,255)">or, if you would like to keep your feedback private, directly to the review manager. When replying, please try to keep the proposal link at the top of the message:</p><blockquote style="margin:0px 0px 16px;padding:0px 15px;border-left-width:4px;border-left-style:solid;border-left-color:rgb(221,221,221);background-color:rgb(255,255,255)"><p style="color:rgb(119,119,119);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;;font-size:16px;margin-top:0px;margin-bottom:16px">Proposal link:</p><blockquote style="margin:0px 0px 16px;padding:0px 15px;border-left-width:4px;border-left-style:solid;border-left-color:rgb(221,221,221)"><div style="margin-top:0px;margin-bottom:0px"><font color="#777777" face="Helvetica Neue, Helvetica, Segoe UI, Arial, freesans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol" size="3"><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0005-objective-c-name-translation.md" target="_blank">https://github.com/apple/swift-evolution/blob/master/proposals/0005-objective-c-name-translation.md</a></font></div></blockquote><p style="color:rgb(119,119,119);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;;font-size:16px;margin-top:0px;margin-bottom:16px">Reply text</p><blockquote style="color:rgb(119,119,119);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;;font-size:16px;margin:0px;padding:0px 15px;border-left-width:4px;border-left-style:solid;border-left-color:rgb(221,221,221)"><div style="margin-top:0px;margin-bottom:0px">Other replies</div></blockquote></blockquote><h5 style="margin-top:1em;margin-bottom:16px;line-height:1.4;font-size:1em;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;;background-color:rgb(255,255,255)"><a href="https://github.com/apple/swift-evolution#what-goes-into-a-review-1" style="background-color:transparent;color:rgb(64,120,192);text-decoration:none;display:inline-block;padding-right:2px;line-height:1.1" target="_blank"><span style="font-weight:normal;font-size:16px;line-height:1;font-family:octicons;display:inline-block;vertical-align:middle"></span></a>What goes into a review?</h5><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;;font-size:16px;background-color:rgb(255,255,255)">The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine the direction of Swift. When writing your review, here are some questions you might want to answer in your review:</p><ul style="padding:0px 0px 0px 2em;margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;;font-size:16px;background-color:rgb(255,255,255)"><li>What is your evaluation of the proposal?</li><li>Is the problem being addressed significant enough to warrant a change to Swift?</li><li>Does this proposal fit well with the feel and direction of Swift?</li><li>If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?</li><li>How much effort did you put into your review? A glance, a quick reading, or an in-depth study?</li></ul><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;;font-size:16px;background-color:rgb(255,255,255)">More information about the Swift evolution process is available at</p><blockquote style="margin:0px 0px 16px;padding:0px 15px;color:rgb(119,119,119);border-left-width:4px;border-left-style:solid;border-left-color:rgb(221,221,221);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;;font-size:16px;background-color:rgb(255,255,255)"><div style="margin-top:0px;margin-bottom:0px"><a href="https://github.com/apple/swift-evolution/blob/master/process.md" style="background-color:transparent;color:rgb(64,120,192);text-decoration:none" target="_blank">https://github.com/apple/swift-evolution/blob/master/process.md</a></div></blockquote><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;;font-size:16px;background-color:rgb(255,255,255)">Thank you,</p><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;;font-size:16px;background-color:rgb(255,255,255)">-Doug Gregor</p><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;;font-size:16px;background-color:rgb(255,255,255)">Review Manager</p></div>_______________________________________________<br>swift-evolution mailing list<br><a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br></div></blockquote></div><br></div><br>_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
<br></blockquote></div>