Swift - About the Swift programming language

First, let's see how Apple describes its Swift:

Swift is an excellent choice for programming, whether it's a phone, computer, or server , any device that can run code. It is the culmination of modern languages , combining the essence of Apple's engineering culture and the diversity of the open source community. The compiler is tuned for performance, the language is optimized for development, and the two never compromise.

The Swift language is also very friendly to new programmers. It was the first industrial- strength systems programming language, yet as powerful and interesting as a scripting language. Write code in the Playground and see the results of Swift code operations in real time, without compiling and running the software from scratch.

Swift avoids common programming mistakes by learning from other modern programming patterns , defining a large number of classes :

  • Variables must be initialized before use;
  • Array indexing checks for out-of-bounds errors;
  • Integers are checked for overflow;
  • Optionals ensure that  nil values ​​are handled explicitly;
  • Automatic memory management;
  • Error handling allows control to be recovered from unexpected errors.

Swift code is compiled and optimized for most modern hardware. Both the syntax and the base library are designed based on guiding principles, which is obviously the best way for you to make your code. This makes Swift's combination of safety and speed the perfect choice for any scenario, from writing "Hello, world!" to entire operating systems.

Swift uses a lightweight syntax to combine powerful type interfaces and pattern matching to express complex ideas in a concise and elegant form. Thanks to this, the code is not only better to write, but also more readable and optimized.

Swift has been on the market for years, and it will continue to evolve with more new features and capabilities. We're confident in the Swift language, and we look forward to your creations in Swift!

Second, the author looks at it this way:

1. The eugenic "second child" of wealthy parents

In the past, programmers used procedural programming and used the classic C language to develop programs. The emergence of object-oriented programming ideas later, let programmers also taste the sweetness.

C++ is a hybrid object-oriented language by adding the concept of object-oriented on the basis of C language. It is powerful but difficult.

Java is improved on the basis of C++. It abandons some of the shortcomings of C++. The syntax is very similar to that of C++. It runs on the Java virtual machine, so it can be compiled across platforms and executed everywhere.

Of course, Microsoft is not showing weakness. How can the dignified group use other people's languages, so it is also based on C. After that, there is C++++, that is, C#.

Apple has also come up with a set of C language, which is Objective-C language.


Apple engineers have been working hard with their eldest son as a "father and son soldier", and so far, they have made a lot of money. In the process, Apple engineers have also accumulated a lot of social experience, and also know the strengths and weaknesses of the eldest son ~ and then look at other people's children. . . Apple engineers fell into contemplation: now that the family is rich and has accumulated a lot of experience in industrial production, we also know which is more important.

It's time to have a second baby!

Let's build a better second child. Give him the best pregnancy preparation, the best nutrition, the best prenatal education, the best education, and the best teachers. . . . .

2. Swift is open source, and the community is more active and stable

Since 2007, Apple engineers have been recruiting in the programmer world. Having followed Apple engineers for so many years, many programmers have long been familiar with the work style of Apple engineers. Now that they are holding a second child, these sincere warriors are of course more qualified than before. Therefore, at this time, when entering the battalion and serving as a soldier, the general's style is more proficient and stable.

3. The general trend, you and I are just one soldier and one soldier

If the parents want to hold the second child, it is bound to cause a large number of cadres to go to the second commander, and the recruits are even more enthusiastic. You and I are one soldier and one soldier. If you want to still join the Apple family in the future, don’t you understand the stakes?

Haha~ To put it bluntly, we are just moving bricks. In the future, bricks will be made with Swift, and resources are important!

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324727398&siteId=291194637