Send an unknown method call: Difference between revisions
Content added Content deleted
(Add Swift) |
(Fix swift) |
||
Line 657: | Line 657: | ||
Generally speaking, pure Swift is a very statically typed language, and calling unknown methods is impossible. However, Swift provides a few ways in which instances of specially marked objects can receive unknown method calls. |
Generally speaking, pure Swift is a very statically typed language, and calling unknown methods is impossible. However, Swift provides a few ways in which instances of specially marked objects can receive unknown method calls. |
||
==Objective-C Compatibility Using @objc== |
===Objective-C Compatibility Using @objc=== |
||
The first case is used for interfacing with legacy Objective-C libraries. Objective-C is heavily dynamic with Smalltalk-style message passing. So Swift must be able to participate in this. |
The first case is used for interfacing with legacy Objective-C libraries. Objective-C is heavily dynamic with Smalltalk-style message passing. So Swift must be able to participate in this. |