![]() ![]() ![]() We make no promises about getting rich, but we do promise that you’ll know how to build iOS apps by the end. Q: How do I run my code on an iPhone or iPad? I bought this book so I could learn to make iOS apps and get filthy rich.Ī: We’ll explain everything you need to know to use your Swift knowledge to make iOS apps much, much later in the book. It’s still valid, it’s just not necessary! If it makes you feel more comfortable, you can do it anyway. Q: Where are the semicolons? I thought programming was meant to be full of semicolons!Ī: While lots of other programming languages require you to end lines with semicolons ( ), Swift doesn’t require it. You can still use nil though, as and when you need it, via optionals. Swift’s objects can never be nil, which helps you prevent runtime crashes in your programs. Swift also heavily leans on the use of value types, which are types that are copied instead of referenced-so you know your value won’t be modified anywhere else when you’re in the midst of using it for something. ![]() For example, variables are always initialized before use, and arrays are automatically checked for overflow, and the memory your program uses is automatically managed. There are a lot of reasons why Swift is often described as safe. Swift is safe because it automatically does many things that other languages require code for, or make it challenging to do at all. And you don’t need to pay much attention to memory management. Swift also supports features that other languages often do not, such as international languages, emoji, Unicode, and UTF-8 text encoding. There’s less to type, compared with many languages, and Swift’s language features make the code cleaner and less likely to have errors. It’s modern because it has incorporated the learnings of other programming languages, and refined the user experience-the user being the programmer-to the point where it’s easier to read the code and easier to maintain the code. Swift is the culmination of decades of programming language development and research. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |