open source Swift, Objective-C and the next 20 years of development

Q&AApple’s Craig Federighi talks open source Swift, Objective-C and the next 20 years of developmenthtml, body {overflow-x: initial !important;}html { font-size: 14px; }
body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-family: ‘Helvetica Neue‘, Helvetica, Arial, sans-serif; font-size: 1rem; line-height: 1.42857143; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255); overflow-x: hidden; }
a:active, a:hover { outline: 0px; }
::selection { background-color: rgb(181, 214, 252); text-shadow: none; background-position: initial initial; background-repeat: initial initial; }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; word-wrap: break-word; position: relative; white-space: pre-wrap; text-align: justify; padding-bottom: 70px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
.typora-export #write { margin: 0px auto; }
#write > p:first-child, #write > ul:first-child, #write > pre:first-child, #write > blockquote:first-child, #write > div:first-child { margin-top: 30px; }
img { max-width: 100%; }
input, button, select, textarea { color: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; }
input[type="checkbox"], input[type="radio"] { line-height: normal; padding: 0px; }
::before, ::after, * { box-sizing: border-box; }
#write p, #write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write div, #write pre { width: inherit; }
#write p, #write h1, #write h2, #write h3, #write h4, #write h5, #write h6 { position: relative; }
h1 { font-size: 2rem; }
p, .mathjax-block { display: block; -webkit-margin-before: 1rem; -webkit-margin-after: 1rem; -webkit-margin-start: 0px; -webkit-margin-end: 0px; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: bold; font-style: italic; }
a { cursor: pointer; }
#write input[type="checkbox"] { cursor: pointer; width: inherit; height: inherit; margin: 4px 0px 0px; }
tr { page-break-inside: avoid; page-break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; page-break-inside: auto; }
table.md-table td { min-width: 80px; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror-code pre { padding: 0px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
.md-fences, pre.md-fences { font-size: 0.9rem; display: block; page-break-inside: avoid; text-align: left; overflow: visible; white-space: pre; position: relative !important; }
.md-fences .CodeMirror.cm-s-default.CodeMirror-wrap { top: -1.6em; margin-bottom: -1.6em; }
.md-fences.mock-cm { white-space: pre-wrap; }
.footnotes { color: rgb(136, 136, 136); font-size: 0.9rem; padding-top: 1em; padding-bottom: 1em; }
.footnotes + .footnotes { margin-top: -1em; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; background-color: transparent; text-decoration: none; color: rgb(51, 51, 51); font-family: ‘Helvetica Neue‘, Helvetica, Arial, sans-serif; font-size: 1rem; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; line-height: normal; font-weight: normal; text-align: left; box-sizing: content-box; direction: ltr; background-position: initial initial; background-repeat: initial initial; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li p, li .mathjax-block { margin: 0.5rem 0px; }
li { margin: 0px; position: relative; }
blockquote > :last-child { margin-bottom: 0px; }
blockquote > :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; }
@media print {
html, body { height: 100%; }
.typora-export * { -webkit-print-color-adjust: exact; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
#write pre.md-meta-block { font-size: 0.8rem; min-height: 2.86rem; white-space: pre; background-color: rgb(204, 204, 204); display: block; background-position: initial initial; background-repeat: initial initial; }
p > .md-image:only-child { display: inline-block; width: 100%; text-align: center; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.mathjax-block { white-space: pre; padding-bottom: 0.65rem; overflow: hidden; width: 100%; }
p + .mathjax-block { margin-top: -1.143rem; }
.mathjax-block:not(:empty)::after { display: none; }
[contenteditable="true"]:active, [contenteditable="true"]:focus { outline: none; box-shadow: none; }
:focus { outline: none; box-shadow: rgb(79, 172, 249) 0px 0px 2px 3px, rgb(120, 174, 218) 0px 0px 2px inset; }
.task-list { list-style-type: none; }
.task-list-item { position: relative; padding-left: 1em; }
.task-list-item input { position: absolute; top: 0px; left: 0px; }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc::after, .md-toc-content::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); text-decoration: none; }
.md-toc-inner:hover { text-decoration: underline; }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: bold; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
.md-toc-h6 { margin-left: 12em; }
@media screen and (max-width: 48em) {
.md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
.md-toc-h4 .md-toc-inner { margin-left: 5em; }
.md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 { margin-left: 9.5em; }
}
a.md-toc-inner { color: inherit; font-size: inherit; font-style: inherit; font-weight: inherit; text-decoration: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: ‘.‘; }
.md-tag { opacity: 0.5; }
h1 .md-tag, h2 .md-tag, h3 .md-tag, h4 .md-tag, h5 .md-tag, h6 .md-tag { font-weight: initial; opacity: 0.35; }
a.md-header-anchor.md-print-anchor { border: none !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: none !important; background-color: transparent !important; text-shadow: initial !important; background-position: initial initial !important; background-repeat: initial initial !important; }

html { font-size: 16px; }
html, body { background-color: rgb(243, 242, 238); font-family: ‘PT Serif‘; color: rgb(31, 9, 9); line-height: 1.5em; }
#write { max-width: 36em; }
ol, ul { list-style: none; }
blockquote, q { quotes: none; }
blockquote::before, blockquote::after, q::before, q::after { content: none; }
table { border-collapse: collapse; border-spacing: 0px; }
h1, h2, h3, h4, h5, h6 { font-weight: bold; }
h1 { font-size: 1.875em; line-height: 1.6em; margin-top: 2em; }
h2, h3 { font-size: 1.3125em; line-height: 1.15; margin-top: 2.285714em; margin-bottom: 1.15em; }
h3 { font-weight: normal; }
h4 { font-size: 1.125em; margin-top: 2.67em; }
h5, h6 { font-size: 1em; }
h1 { border-bottom-width: 1px; border-bottom-style: solid; margin-bottom: 1.875em; padding-bottom: 0.8125em; }
a { text-decoration: none; color: rgb(6, 85, 136); }
a:hover, a:active { text-decoration: underline; }
p, blockquote, pre.md-fences, .md-fences { margin-bottom: 1.5em; }
h1, h2, h3, h4, h5, h6 { margin-bottom: 1.5em; }
blockquote { font-style: italic; border-left-width: 5px; border-left-style: solid; margin-left: 2em; padding-left: 1em; }
ul, ol { margin: 0px 0px 1.5em 1.5em; }
ol li { list-style-type: decimal; list-style-position: outside; }
ul li { list-style-type: disc; list-style-position: outside; }
.md-meta, .md-before, .md-after { color: rgb(153, 153, 153); }
table { margin-bottom: 1.5em; font-size: 1em; }
thead th, tfoot th { padding: 0.25em 0.25em 0.25em 0.4em; text-transform: uppercase; }
th { text-align: left; }
td { vertical-align: top; padding: 0.25em 0.25em 0.25em 0.4em; }
code, pre.md-fences { background-color: rgb(218, 218, 218); padding-left: 1ch; padding-right: 1ch; }
pre.md-fences { margin-left: 2em; margin-bottom: 3em; }
pre, code, tt { font-size: 0.875em; line-height: 1.714285em; }
h1 { line-height: 1.3em; font-weight: normal; margin-bottom: 0.5em; }
p + ul, p + ol { margin-top: -1em; }
h3 + ul, h4 + ul, h5 + ul, h6 + ul, h3 + ol, h4 + ol, h5 + ol, h6 + ol { margin-top: 0.5em; }
li > ul, li > ol { margin-top: inherit; }
h2, h3 { margin-bottom: 0.75em; }
hr { border-style: none none solid; border-bottom-width: 1px; }
h1 { border-color: rgb(197, 197, 197); }
blockquote { border-color: rgb(186, 186, 186); color: rgb(101, 101, 101); }
thead.md-table-edit { background-color: transparent; }
thead { background-color: rgb(218, 218, 218); }
tr:nth-child(even) { background-color: rgb(232, 231, 231); background-position: initial initial; background-repeat: initial initial; }
hr { border-color: rgb(197, 197, 197); }
.task-list { padding-left: 1rem; }
.task-list-item { padding-left: 1.5rem; list-style-type: none; }
.task-list-item input::before { content: ‘√‘; display: inline-block; width: 1.25rem; height: 1.5rem; vertical-align: middle; text-align: center; color: rgb(221, 221, 221); background-color: rgb(243, 242, 238); }
.task-list-item input:checked::before, .task-list-item input[checked]::before { color: inherit; }
#write pre.md-meta-block { min-height: 1.875rem; color: rgb(85, 85, 85); border: 0px; background-color: transparent; margin-left: 1em; margin-top: 1em; background-position: initial initial; background-repeat: initial initial; }
.md-image > .md-meta { color: rgb(155, 81, 70); }
.md-expand.md-image > .md-meta { background-color: rgba(255, 255, 255, 0.65098); }
.md-image > .md-meta { font-family: Menlo, ‘Ubuntu Mono‘, Consolas, ‘Courier New‘, ‘Microsoft Yahei‘, ‘Hiragino Sans GB‘, ‘WenQuanYi Micro Hei‘, sans-serif; }
#write > h3.md-focus::before { left: -2.5rem; color: rgb(153, 153, 153); border-color: rgb(153, 153, 153); }
#write > h4.md-focus::before { left: -2.5rem; top: 0.25rem; color: rgb(153, 153, 153); border-color: rgb(153, 153, 153); }
#write > h5.md-focus::before { left: -2.5rem; color: rgb(153, 153, 153); border-color: rgb(153, 153, 153); }
#write > h6.md-focus::before { left: -2.5rem; top: 0.3125rem; color: rgb(153, 153, 153); border-color: rgb(153, 153, 153); }
.md-toc:focus .md-toc-content { margin-top: 19px; }
.md-toc-content:empty::before { color: rgb(6, 85, 136); }
.md-toc-item { color: rgb(6, 85, 136); }
#write div.md-toc-tooltip { background-color: rgb(243, 242, 238); }
#outline-dropmenu { background-color: rgb(243, 242, 238); -webkit-box-shadow: rgba(0, 0, 0, 0.372549) 0px 6px 12px; box-shadow: rgba(0, 0, 0, 0.372549) 0px 6px 12px; }
.pin-outline #outline-dropmenu { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; box-shadow: none; border-right-width: 1px; border-right-style: dashed; background-position: inherit inherit; background-repeat: inherit inherit; }
.pin-outline #outline-dropmenu:hover .outline-title-wrapper { border-left-width: 1px; border-left-style: dashed; }
.outline-item:hover { background-color: rgb(218, 218, 218); border-left-width: 18px; border-left-style: solid; border-left-color: rgb(218, 218, 218); border-right-width: 18px; border-right-style: solid; border-right-color: rgb(218, 218, 218); }
.outline-expander::before { content: ‘?‘; font-family: FontAwesome; font-size: 14px; top: 1px; }
.outline-expander:hover::before, .outline-item-open > .outline-item > .outline-expander::before { content: ‘?‘; }

Q&A: Apple’s Craig Federighi talks open source Swift, Objective-C and the next 20 years of development# The Next Web: Why did you open source Swift?Why did you decide now was a good time to open source Swift? The language is still very young and dynamic.Apple released Swift under the Apache 2.0 license. You’re posting the code to GitHub, but also have a dedicated website for Swift. How does Apple plan to support the developer community with this open source effort?Where should developers seek interaction from Apple: GitHub or swift.org?Where does this leave Objective C?Was part of open sourcing Swift to aid enterprise?Finally, what do you hope an open source Swift will accomplish? Similarly, do you have any concerns about it being open?

Q&A: Apple’s Craig Federighi talks open source Swift, Objective-C and the next 20 years of development

Apple has a lot of open source efforts, but none as big or important as Swift. In announcing Swift as an open source project at WWDC earlier this year,?Apple’s Senior Vice President of Software Craig Federighi said it would be the language we use for the next 20 years.

I recently spoke with Federighi to discuss some of the finer points of Apple’s latest open source?effort, and where Swift (along with the developer community) is headed.

# The Next Web: Why did you open source Swift?

Craig Federighi: We think Swift is the next major programming language; the one people are going to be programming in for the coming several decades. We think it’s a combination of it being a great systems and apps programming language that’s fast and safe, but also being really expressive and easy to learn.

It’s the perfect programming language for anyone who is learning to program all the way to writing systems. We want everyone to learn Swift as their primary language, and we want — when developers invest in Swift — to be able to use it everywhere from scripting to apps for mobile down to writing code in the cloud.

We think the best way to enable all of that is to open source it.

Why did you decide now was a good time to open source Swift? The language is still very young and dynamic.

In part because everything with Swift has happened at such an incredible pace. We love Swift, and we thought our developer community would love it too, but the reception has blown us away.

I think there’s such hunger out there right now. We’ve had partners come to us and say ‘we love Swift and we want to use it everywhere.’ IBM is an example of that.

People are investing in Swift right now. There’s a demand and a need to make it available. At the same time, we feel Swift is at a state of — while it’s still an evolving language — readiness, and now is the right time to bring it out into the open.

We knew when we released Swift 1.0 that it would not be the right time. As we were working on Swift 2.0, we knew we were working toward a point of stability where we could open source it. When WWDC rolled around, we realized we were ready, and this was the year to make that happen.

Apple released Swift?under the Apache 2.0 license. You’re posting the code to GitHub, but also have a dedicated website for Swift. How does Apple plan to support the developer community with this open source effort?

We wanted to make sure we had a standard and permissive license that was well recognized. We added a runtime exception to make it even more permissive so that people don’t have to worry about embedding attribution of the write programs that use Swift and embed the runtime.

So this is a true open source project in every sense. It’s being developed out in the open, and all the code is up on GitHub. All of our development, day to day, is happening in the repository for everyone to watch as it unfolds.

Future language direction, like things we plan to do with Swift 3.0, are also being announced to the community today on swift.org.

We expect that many will contribute, and we’re open to patches from anyone. Ultimately we expect to have a strong set of contributors from outside Apple working on the project.

I think the Apple developer community has already seen that the Swift team is really open and has been taking feedback since the moment Swift was released. Even some of the changes made in Swift 2.0 were heavily influenced from developer feedback [on Swift 1.0].

Now with Swift development occurring out in the open, I think we’ll see that taken to a different level.

Where should developers seek interaction from Apple: GitHub or swift.org?

We see swift.org as a sort of initial hub. If you go there, it directs you to things like the ‘getting started’ guide or a download for the current build of Swift for OS X, iOS, tvOS and Linux. It also has overview content about the project and sub-projects, and links off to the Git repository where all the source code is.

[Side note: swift.org is where developers should file issues or comments, while the code hosting is done on GitHub. Filing patches would need to go through GitHub, and compiler issues should get their own Radar via the Apple Developer portal.]

Where does this leave Objective C?

Objective C is forever. I don’t think anyone should fear for the future of Objective C. We’re going to continue to support Objective C for ourselves and the developer community.

We think Objective C is still a great language, and Apple has an investment in many many millions of lines of Objective C, and that’s not going to change.

At the same time, we do think developers new to our platforms that need to pick a language to learn, and write an app, Swift is the right place to start and invest. The productivity advantages and power of Swift are?where we think new developers should focus their energies.

Was part of open sourcing Swift to aid enterprise?

As people become invested in Swift and train their enterprise developers in building the client-side mobile apps in Swift, the developers love it and want to take those skills and even share some of the model-level code from their applications and run it in the cloud — and they want to do it in Swift. They’re seeing the advantages of the language.

IBM has been a major source of that feedback for us, and they’ve been eager since they got started with Swift, saying “how can we take these applications we’re writing for enterprise all the way from the mobile platform into the cloud?”

So open sourcing and having a runtime that can run on Linux is going to make that possible in a big way.

Finally, what do you hope an open source Swift will accomplish? Similarly, do you have any concerns about it being open?

In terms of where we hope the open source project will take Swift, it comes back to the original goals of making Swift the language you learn to program in from the outset, and know that when you learn it you’ll be able to use it to accomplish everything you want to accomplish, all the way from building mobile applications to cloud development. Open sourcing it creates a really clear path to what was already starting to happen.

If a university wants to revise their core curriculum and start teaching programming in Swift, it being open source really makes that an easy decision for them to make.

If you’re a developer thinking “hey, can we go Swift front to back?”, now they have it.

Where we expect the community to really push is the cloud framework, and we think there will be a lot of energy to adapt Swift into the datacenter. There’s a lot of good work to be done there, and we feel the community is in the best position to do that.

We can see all kinds of specialized Swift toolkits being created for big data, machine learning — you name it, I think there will be a really vibrant community around all of those things.

Ultimately, this kind of energy will create even more focus around tools that will even benefit developers on Apple’s core platforms.

We didn’t have significant concerns about where we didn’t want developers to take it. We say “the more Swift, the merrier.”

undefined

时间: 2024-08-01 21:00:08

open source Swift, Objective-C and the next 20 years of development的相关文章

4 字符串 Swift/Objective -C ——《Swift3.0从入门到出家》

4 字符串   Swift and Object-C 字符串由多个字符组成,使用 “” 引起的内容 swift语言中提供了两种字符串:可变字符串和不可变字符串 可变字符串:字符串的内容可以修改,字符串的长度可以修改,用var修饰 不可变字符串: 字符串的内容和长度都不能修改,用let修饰 Swift 和 Obiect-C之间的转换 用as 转换    [当前类型  as  想转换的类型] var str: NSString = “I Love Object - C” let str0 = str

《从零开始学Swift》学习笔记(Day 20)——函数中参数的传递引用

原创文章,欢迎转载.转载请注明:关东升的博客 参数的传递引用 类是引用类型,其他的数据类型如整型.浮点型.布尔型.字符.字符串.元组.集合.枚举和结构体全部是值类型. 有的时候就是要将一个值类型参数以引用方式传递,这也是可以实现的,Swift提供的inout关键字就可以实现.看下面的一个示例: func increment(inoutvalue:Double, amount:Double = 1.0) {     value += amount }   var value : Double = 

Swift is Open Source 博客note

Swift is Open Sourcehtml, body {overflow-x: initial !important;}html { font-size: 14px; } body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-

汇集了很多swift 学习指南

https://github.com/ipader/SwiftGuide 1,059   Unstar7,294 Fork1,966 ipader/SwiftGuide CodeIssues 0Pull requests 0WikiPulseGraphs 这份指南汇集了Swift语言主流学习资源,并以开发者的视角整理编排.http://dev.swiftguide.cn 376 commits 3 branches 0 releases 12 contributors Swift 100.0%

Swift 学习指南

github地址:https://github.com/ipader/SwiftGuide Swift 语言指南 @SwiftLanguage 更新于 2016-4-18,更新内容详见 Issue 51.往期更新回顾详见<收录周报> 这份指南汇集了 Swift 语言主流学习资源,并以开发者的视角整理编排.对于精选项目及文章,可直接访问<Swift 项目精选>和<Swift 文章精选>. 目录 入门指引 教程文章 开源项目 推荐网站 开发工具 媒体报道 开放平台 Appl

Swift 语言指南--来自github学习

@SwiftLanguage 更新于 2016-6-6,更新内容详见 Issue 55.往期更新回顾详见<收录周报> 这份指南汇集了 Swift 语言主流学习资源,并以开发者的视角整理编排.对于精选项目及文章,可直接访问<Swift 项目精选>和<Swift 文章精选>.还有开发者们自己维护的<Swift 开发者.项目.最佳实践>.当然也不能错过那些活跃.优秀的<开发者个人资料页>. 目录 入门指引 教程文章 开源项目 推荐网站 开发工具 媒体报

21个高质量的Swift开源iOS App

对Swift初学者来说,学习开源项目,阅读源码是个不错的方法.在这篇文章中,基于对代码质量和排名的考量标准,Mybridge AI从900个用Swift编写的开源APP中甄选了21个项目推荐给开发者(不包括开源库). No.1 [Official] Firefox iOS app built in Swift (Github Stars: 5,906 ). No.2 [Official] WordPress for iOS written in Swift (Github Stars: 1,22

5 数组 Swift/Object-C ——《Swift3.0从入门到出家》

Swift中数组是一种数据结构,用来存放多个形同类型的数据结构,数据在数组内的存放是有序的,存进来的数据个读出来的顺序相同 Object-C 中数组能够存放任意类型的数据类型为[AnyObject] Swift中数组有两种形式: 可变数组:用var修饰,数组的内容及长度可以任意修改 不可变数组:用let修饰,数组的内容及长度都不能修改 Object-C 数组中也有两种形式 不可变数组:let arr: NSArray = NSArray.init(objects: 10,”hello”,1.23

swift.org - About Swift 官网关于notes

About Swifthtml, body {overflow-x: initial !important;}html { font-size: 14px; } body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 1re