> Am 11.11.2017 um 19:03 schrieb Chris Lattner <[email protected]>: > >> Swift is quite flexible on what can act as a closure — would it be allowed >> to use a dynamic callable in that context? >> I guess forwarding of >> >> let closure: ([(String, Int)]) -> Int = DynamicCallableType() >> >> to the dynamicCall method of DynamicCallableType isn’t that hard, but >> wouldn’t it be odd if the value of closure changes when you leave out its >> type? > > I’m not sure I understand what you’re getting at. Can you show how this > would work with the example in the motivation section?
I’m just asking if this should work ;-) — I didn’t see anything regarding it in the proposal. But to take something from the document: // file = open(filename) let file = Python.open.call(filename) let openFile: (String) -> FileHandle? = Python.open // is this be possible, or an error?
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
