Here's a fancier exercise of programming-language features:
99 Bottles of Beer | Start To generate the stanzas of that song, it is necessary to do arithmetic, comparisons, conditional execution, looping, and assembling strings for output. So what might a Swift version look like?
I've been reading Apple's Swift book, and while it is not a good textbook on programming in general, it does a reasonable job of introducing features of that language.
Swift seems rather Python-like to me, but it has compile-time type checking rather than Python's run-time type checking. That and other Swift features, like declared constants, are good for catching various bugs in advance. That is good for software that will be widely distributed to nontechnical users, especially software whose source code will not be distributed along with it.
Swift does not have untyped macros like the C preprocessor. However, it does have generics, like C++ template functions and classes, and they do much of what the C preprocessor is often used for. Swift's declared constants, like C++ "const" ones, also do some of the C preprocessor's work, and do it in a type-safe manner.
I don't understand why some people dislike declared constants and type safety and other such features. I don't see how anyone could possibly love the C preprocessor, because it's so bug-prone.