Objective-Cだと今でもマクロを使うことはあります. (ReactiveCocoaなんかも依存していますね.) プロダクトコードで使うのはできたら避けたいマクロですが,ビルド設定によって動作を切り替えたいときとかには結構便利です. しかしながら,Swiftにはマクロは存在しないので,このような手段を使って代替します. Simple Macros いわゆる定数を定義するマクロです. Swiftで定数を定義したいときはletを使うべきです. #define FADE_ANIMATION_DURATION 0.35 このようなマクロによる定数の定義は, let FADE_ANIMATION_DURATION = 0.35 とletを使えば実現できます. マクロに比べ型チェックがされますので圧倒的にセキュアです. 筆者はこの他に定数を定義するのにcomputed propertyをよく利用