Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learning Swift Second Edition - Second Edition

You're reading from  Learning Swift Second Edition - Second Edition

Product type Book
Published in Mar 2016
Publisher
ISBN-13 9781785887512
Pages 308 pages
Edition 2nd Edition
Languages
Author (1):
Andrew J Wagner Andrew J Wagner
Profile icon Andrew J Wagner

Table of Contents (19) Chapters

Learning Swift Second Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
1. Introducing Swift 2. Building Blocks – Variables, Collections, and Flow Control 3. One Piece at a Time – Types, Scopes, and Projects 4. To Be or Not To Be – Optionals 5. A Modern Paradigm – Closures and Functional Programming 6. Make Swift Work For You – Protocols and Generics 7. Everything Is Connected – Memory Management 8. Paths Less Traveled – Error Handling 9. Writing Code the Swift Way – Design Patterns and Techniques 10. Harnessing the Past – Understanding and Translating Objective-C 11. A Whole New World – Developing an App 12. What's Next? – Resources, Advice, and the Next Steps Index

Computer data storage


Before we start looking at the code, we need to understand in some detail how data is represented in a computer. The common cliché is that all data in a computer is in 1s and 0s. This is true, but not so important when talking about memory management. Instead, we are concerned about where the data is stored. All computers, whether a desktop, laptop, tablet, or phone, store data in two places.

The first place we normally think of is the file system. It is stored on a dedicated piece of hardware; this is called a hard disk drive in many computers, but more recently, some computers have started to use solid-state drives. The other thing we hear about when buying computers is the amount of "memory" it has. Computer memory comes in "sticks" which hold less information than normal drives. All data, even if primarily stored on the Internet somewhere, must be loaded into the computer's memory so that we can interact with it.

Let's take a look at what that means for us as programmers...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}