最近在回答StackOverflow的问题时,发现performSelector方法在Swift被去掉,Apple的注释是这个方法被去掉是因为不安全: NOTE The performSelector: method and related selector-invoking methods are not imported in Swift because they are inherently unsafe. 如果在Swift调用这个方法会编译出错: 'performSelector' is
Adding Elements internal func _unsafeInsertNew(_ element: __owned Element) { _internalInvariant(count + 1 <= capacity) let hashValue = self.hashValue(for: element) if _isDebugAssertConfiguration() { // In debug builds, perform a full lookup and trap