字幕列表 影片播放 列印英文字幕 Can you give me a non-techie Objective-C vs Swift comparison? Objective-C is what Apple has had its OS written in for years. Swift is what Apple now says they want their OS written in for next year and beyond. Objective C has a reputation for being hard. It is. It is the C language, with its complicated syntax and grammar, with a lot of classes and manipulations to make a functional language an object oriented one. How is Swift different? Swift is a new language designed from the beginning to be object oriented. It is expected to be a lot easier to create commands, classes, references and so forth with objects. I would not object to that. So why is not Swift getting picked up faster? Google came out with Go and Dart. Go gets used by Google for applications on its concurrent servers, but Dart missed the mark and is almost never used. Swift is mandated by Apple. But a lot of their stuff is already done in Objective C. And a lot of new projects will still be done in Objective C, because that’s what the programmers know. It is also the language of the code modules they can pull from to build new stuff quickly. Unless Swift is like Scala, where you can plug in Java code and it still works in Scala programs. The methods and properties and so forth are pretty much the same. In theory, there’s no difference between reality and theory. In reality, there is. Objective C has the benefit of being established, and almost all code and all third party libraries are in Objective C. So learning Swift won’t make me first out of the gate to get a programming job. Even with the 2014 roll-out of Swift, the user community is small, so there are not as many online resources or question and answers on Stackoverflow to help you get good with it. But rewriting all the existing code in Swift would provide employment. In the future, sure. But right now, only Apple hires people with Swift knowledge to develop the iOS8 and Yosemite OSX. Not too different from Objective C. If you want to work today, learn Objective C first and then learn Swift. Because I have to know both to convert them anyway. What are the major differences between them? Swift is a beta language, so it may change. For example, Swift’s developers said they probably have to change its syntax and behavior. I cannot learn something that’s always changing like that. There have already been a lot of changes to Swift, and it is going to change more. It is having problems in testing with auto-complete and syntax. So wait to learn Swift until there’s a final version, just so I do not get obsolete in an old version. The worst part is that the Swift code you write today could be obsolete with the final version of Swift, when they officially have Swift 1.0. So learn Objective C today to get to work, and wait until Swift actually works before trying to learn how to work in it.
B1 中級 Objective-C與Swift對比 (Objective-C vs Swift Comparison) 58 10 阿蘭 發佈於 2021 年 01 月 14 日 更多分享 分享 收藏 回報 影片單字