> On Nov 11, 2017, at 6:29 AM, Joe Groff via swift-evolution > <[email protected]> wrote: > >> below the fold as far as the rest of the language is concerned. You could >> just as well written what the importer synths up in Swift directly: >> >> func foo(bar: String) { >> unsafeBitCast(objc_msgSend, to: @convention(c) (AnyObject, Selector, >> NSString) -> ().self)(self, "fooWithBar:", NSString(bar)) >> } >> >> and the rest of the language would be none the wiser. > > Though, since you bring up objc_msgSend, the way it works in ObjC might be a > better fit for Swift's name lookup model, since their keyword argument models > are similar. If Swift had a 'method of last resort' like ObjC's
In fact, this is the subject of the next proposal that I will write up when I have time. -Chris
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
