Summary

In this chapter you have learned how to create your own custom syntax. These features are super-duper powerful and can be combined in many different ways. When you combine them with trailing closures and @autoclosures (which you will learn about in Chapter 9, “Becoming Flexible with Generics”), the possibilities are endless. You can define your own way of processing data with your own custom operators using your own custom classes made of ASCII pandas and Hebrew letters. You can, technically, use the subscript syntax however you want, but remember that with great power comes great responsibility. You have to be careful not use them as functions but to use them as element assessors.

You’ve also learned in this chapter that generics give ...

Get Learning Swift™ Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.