Cool! How do you see fixing this? Something like the approach @Chris_Lattner3 and I suggested?
I think @Chris_Lattner3's approach is interesting and merits further discussion, but implementing it would require a fair amount of work. Fixing the immediate issue of the default argument generator not being able to capture bindings from outer scopes is a much simpler undertaking that requires unifying the code for emitting default argument generators with the code that emits a closure and its captures.
Oh, I see. Is this an active task? Will it make it to Swift 5.0 release?
You're unlikely to get a firm answer on a "will it be in swift 5" unless it is already done and in :-)
3 Likes