Swift에서 변수의 유형 또는 클래스를 어떻게 인쇄합니까?
변수의 런타임 유형을 신속하게 인쇄하는 방법이 있습니까? 예를 들면 다음과 같습니다. var now = NSDate() var soon = now.dateByAddingTimeInterval(5.0) println("\(now.dynamicType)") // Prints "(Metatype)" println("\(now.dynamicType.description()") // Prints "__NSDate" since objective-c Class objects have a "description" selector println("\(soon.dynamicType.description()") // Compile-time error since ImplicitlyUnwrappedOptional<NSDate> has no "description" method 위의 예에서 변수 "soon"이 유형 …