Swift Learning NOTE 1---variables and tuples

Source: Internet
Author: User

It feels like a basic grammar and JS.

But the biggest difference is that Swift is a strong type of language, and I personally agree with the strong type, because if the type is prone to hidden bugs that are hard to spot, it is very much in favor of Apple's approach.

Therefore, according to the characteristics of strong type, it can be very natural to derive a lot of differences, such as with A=1;if (a) {println ("It is true");} Such statements will be swfit in the error, it is rightfully true, A is not a Boolean type, this is very sensible practice.

In addition, the concept of tuples can be a good solution to the function to return a number of different types of data, the individual is great.

Just started to learn, feel like Swift

Strive for later let Swfit become my main force!

Swift Learning NOTE 1---variables and tuples

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.