<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Given the educational angle that seems to be part of the mission of Swift, I was hoping that the Raspberry Pi port would be something the Swift project would directly integrate &nbsp;and distribute&nbsp;<br><br>-david</div><div><br>On Jan 2, 2016, at 3:00 PM, Philippe Hausler via swift-corelibs-dev &lt;<a href="mailto:swift-corelibs-dev@swift.org">swift-corelibs-dev@swift.org</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div class=""><br class=""></div><div class="">Responses inline:</div><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 2, 2016, at 3:58 AM, Drew Crawford via swift-corelibs-dev &lt;<a href="mailto:swift-corelibs-dev@swift.org" class="">swift-corelibs-dev@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I had a question about something I saw in the docs:<div class=""><br class=""></div><div class=""><blockquote type="cite" class="">A significant portion of the implementation of Foundation on Apple platforms is provided by&nbsp;another framework called CoreFoundation (a.k.a. CF). CF is written primarily in C and is very&nbsp;portable. <b class="">Therefore we have chosen to use it for the internal implementation of Swift&nbsp;Foundation where possible.</b> As CF is present on all platforms, we can use it to provide a&nbsp;common implementation everywhere.</blockquote><div class=""><br class=""></div>(emphasis added)<br class=""><br class=""></div><div class="">Is the intent of this paragraph to suggest that most PRs to swift-corelibs-foundation should be a C-language implementation to CF with a light Swift wrapper? &nbsp;That goes against my intuition, but it "seems to be" a plain reading of the paragraph.</div></div></div></blockquote><div><br class=""></div><div>I think the underlying intent is that we should use the right tools for the job; where it makes sense, even the standard library uses C++. Similarly some of the interfaces for ICU for example make much more sense to encapsulate with CF (and re-use some of the existing cross platform abstractions). Some classes will be a thin veneer on top of CF, where-as others will be a completely swift implementation. Take the two cases of NSCalendar and NSThread. CF provides some very hard to write (and hard to get right) implementations of calendrical math, even though I wrote a good portion of the NSCalendar swift implementation; I am definitely glad that there was an implementation I could fall back upon to deal with that logic. The counterpoint of NSThread; we could have wrapped up a CFThreadRef type object and bridged it across but It made sense to keep NSThread in the realm of Swift not only for a potential example of dealing with posix APIs for the community but also it just worked out more cleanly in my opinion.</div><div><br class=""></div><div>I have not crunched the numbers but I have a gut feeling that a large majority of the pull requests have been mostly Swift implementations and only a few of them have been thin veneers on-top-of CF and even fewer have been changes to CF itself.</div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">its justification about "all platforms" is also strange–I know CF "kind of" builds for Windows, but is anyone actually testing it there? &nbsp;To make sure we aren't breaking it? &nbsp;Or does "all platforms" mean something else here?</div></div></div></blockquote><div><br class=""></div><div>I know there have been efforts to port swift to FreeBSD and to new architectures like ARM-elf for things like Raspberry Pi, I would not be surprised that there are efforts to port to Android or Windows out there. Granted we do not have any CI provided by Apple to ensure not breaking these efforts but I think that the community will be interested in keeping these things running since a cross platform framework and language are really appealing (even Apple makes a few products for Android and Windows…)</div><div><br class=""></div><div>As of current the Windows target is not held directly from the point at which this CF was cut from; so I would probably say “trust but verify” and I would not be surprised that there may be a few breaking points there that need to be re-looked at for that platform. I am certain that if someone took up a new target like Windows that would be met with great enthusiasm from all of the swift community. I was ecstatic when I saw that there was a FreeBSD port.</div><div><br class=""></div><div>I think the one major thing to take under consideration is that alternate platforms than Mac OS X and Ubuntu 14/15 don’t have integration into the CI that the swift project maintains. I think however if there is strong desire out there it would be interesting to have externally maintained build servers provided by the community to verify these targets. I am not in charge of that type of decision but I would definitely think that it would be an amiable goal and I would think that it would be worthwhile to discuss further.</div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">I feel like this paragraph is an opportunity to explain to a patch author how to structure their patch between use/maintenance/contributions to the CF layer vs the Swift layer. &nbsp;I feel like it could do a much better job, but I don't understand what the design guidance actually is, so I can't fix it.</div><div class=""><br class=""></div></div></div></blockquote><div><br class=""></div>Things that enter into CF territory will be things that we will consider with a very close eye on them because they will likely move up-stream into the CoreFoundation that ships with our current platforms so that the lifecycle completes back out to the exported version in the open-source side of it. &nbsp;The Foundation part of the story is a bit more mutable since we have the Objective-C version that will still be maintained. That being said there is a very strong desire to keep these in parity; we may use some of the interfaces in the swift version to try out what people think of these APIs (most of these are marked with experimental, and if they are not we should either correct them to be the same or mark them as such). Furthermore the swift version will sometimes drive internal efforts to improve Foundation as a whole not just it’s swift exposition. We have already had a few proposals that are making their ways to the component owners and teams that will improve the state of affairs for not just swift but objc too as externally authored proposals.&nbsp;</div><div><br class=""></div><div>I agree that some of this intent should be a bit more clearly laid out; I will discuss about this when I get back into the office Monday and see what we can come up with to more clearly illustrate what is expected, what types of fallout patches have, and how the process will work for each potential layer and interaction.</div><div><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=0mkChau6XnFV-2FCNUik62L9ZaldD0W0ziOwj-2F3jLx36-2FqtebgUdvV-2FrISSN5bRPQszzzD-2BcyZHj2kWCuyYVg1a-2Bk0upC3-2FYY2mSOVzmScBnt0PJ-2F5GbSsW9s20TyLm0aAYQ6YdEF5OfSL-2BOKA2cypNRyGg3nmi-2FUGf8MyCgZ2dEDVwkH3DZCg20dDrUKlTewoVDRPY3lL3EcyPNL5B4TvXrHvZr3-2BjaWohfiL7huxUAU-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">
</div>
_______________________________________________<br class="">swift-corelibs-dev mailing list<br class=""><a href="mailto:swift-corelibs-dev@swift.org" class="">swift-corelibs-dev@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-corelibs-dev">https://lists.swift.org/mailman/listinfo/swift-corelibs-dev</a><br class=""></div></blockquote></div><br class="">
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=UJ2JtEf0s1EYfJpqPOhxjba877lEdvj4AfM8t66mFRv4SSFYrxsFvh-2FbHEhqy3gl9-2BCHhf8AxoQCbu1jAIoTCUTgUbZuXdJFx3UMXIhot6QD4vzDNEg5zbAXNyFtDh06WfPr1nS-2FzxWIeGNLFLaROGJspLsNj4rdmlOgcXoHuHSQib13S9WAGWRrQhhZBf1uxSy-2BziaSLO5KxbeFM5AE8M7lU-2BPjQK74vEziXWwLd-2B8-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;">

</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-corelibs-dev mailing list</span><br><span><a href="mailto:swift-corelibs-dev@swift.org">swift-corelibs-dev@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-corelibs-dev">https://lists.swift.org/mailman/listinfo/swift-corelibs-dev</a></span><br></div></blockquote></body></html>