This week, let’s take a look at a few of those compiler directives and what sort of situations that each of them might be particularly useful in. However, sometimes we might want to perform certain checks and run other kinds of custom logic when our code is being compiled, and although Swift doesn’t (yet) include a fully-featured macro or preprocessing system, it does ship with a few built-in compiler directives and conditions that enable us to influence the compilation process in various ways. Even though Swift has a very strong compile-time focus when it comes to how it verifies and type-checks the code that we write, it’s still primarily used to implement runtime logic.
0 Comments
Leave a Reply. |