As such, you should take everything in this chapter with a grain of salt and mainly as an inspiration rather than a single truth. Note: API design is a highly opinionated topic. ![]() We’re opening a discussion together, me and you, to hopefully help inspire you with some fresh new ideas and ways of thinking about API design. You’re welcome to stop at any point to experiment with a specific idea in Xcode. It’s more of a philosophical and exploratory chapter that doesn’t cover one specific topic. This chapter will also be less code-heavy than previous ones and won’t require you to copy-paste code or run any project. Finally, a few important concepts and ideas related to the process of shipping your API to the world.Documenting your APIs using Swift’s powerful markup syntax.Powerful language features with examples you can leverage for your APIs, including examples from Swift itself: Literals, Dynamic Member Lookup, Dynamic Callable, Property Wrappers and others.How to separate and encapsulate your implementation details from your public API using access levels.You may freely explore each of these individual topics based on your interest: Each of these isn’t directly related to the previous one, but they all tie into enhancing your skillset and intuition for designing great APIs. In this chapter, you’ll explore a few different topics. That’s why this chapter is going to be a bit different. In those cases, just knowing Swift as a language isn’t enough, and neither is just practicing a specific language feature. ![]() More often than not, though, you’ll find yourself creating code that’s used not only by you but also by your team, or even other teams if you’re creating an open-source project. You’ve spent most of your time in this book diving into specific topics, learning how they work, writing code to sharpen your instincts around them and working through real-life examples.Īlthough using Swift and all its incredible capabilities is a wonderful skill to have, it doesn’t help much without actually shipping code with it. Section III: Techniques Section 3: 6 chapters Show chapters Hide chaptersġ0.4 Higher-order functions in the standard library Sequences, Collections & AlgorithmsĨ.2 What you’ll learn, and what you won’tĩ.1 Definition of unsafe & undefined behaviors Section II: Standard Library Section 2: 5 chapters Show chapters Hide chaptersĥ.4 Full generic programming with floating-point
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |