5 years ago (2015-12-30)  Algorithm language |   First to comment  8 
post score 0 times, average 0.0

Due to participate in an iOS contest, very guests have recently started learning swift language.The swift language is a new programming language released by Apple in 2014 that develops Apple-owned software. It seems that there is a tendency to suppress the objective c language that was used to develop Apple software. Therefore, individuals feel that learning swift is still promising.Since the development of iOS requires the MAC system, it took a lot of time for my Dell computer to install the “black apple”. However, because of the driving problem, it was impossible to connect to the Internet, which greatly affected learning.To this end, I am very grateful to Mr. Fan Yang for borrowing an idle MAC computer. swift Compared to the c++, java, php, and javascript languages ​​that have been studied previously, the swift language seems to me more advanced or "Advanced" is more concise than swift in Java and other languages. It is extremely powerful for some data types such as arrays. Writing a large amount of swift code can do a lot of things.The simple, advanced swift can save the programmer's typing workload, but it also means that the language may be more encapsulated.Encapsulation makes members easy to operate but will keep programmers farther and farther away from the bottom layer, and the memory of upper functions will increase.The difference between swift and other high-level languages ​​is still very big. Unlike java and php, the similarity is very great. As long as you learn java, php can learn from oneself in a short time. After learning a few computer languages, I think it is very important to compare a previous language when you learn a new language.Therefore, when learning swift, it is necessary to learn analogy with other languages ​​in order to strengthen memory and prevent "string odors" among various languages.

What is swift oriented to?

Similar to php, swift supports both process-oriented and object-oriented. There is no need to write all operations as a single class and method. Java is a strict object-oriented language.But PHP is a scripting language, but swift is not, the scripting language is interpreting execution, the execution file is text; the compiled language, the execution file is binary, swift needs to be compiled to generate a binary executable file.

Swift is not a weak type

Swift doesn't explicitly declare variable types like javascript, but swift that doesn't declare a variable type will automatically infer the variable type based on the situation.For example, var a = "hello world", a will be inferred as a string type.


This article has been printed on copyright and is protected by copyright laws. It must not be reproduced without permission.If you need to reprint, please contact the author or visit the copyright to obtain the authorization. If you feel that this article is useful to you, you can click the "Sponsoring Author" below to call the author!

Reprinted Note Source: Baiyuan's Blog>>https://wangbaiyuan.cn/en/learning-swift-one-instance-1-language-description-2.html

Post comment


No Comment


Forget password?