[swift-evolution] [Idea] A way to build an arguments list dynamically
Eugene Gubin
hemet.mail at gmail.com
Sun Jan 24 04:26:13 CST 2016
Hi,
This is not a proposal, just a sketch. I think this could be convenient for
DI frameworks for example.
func resolve<Params, Result>(factory: Params -> Result) -> () -> Result {
return {
let pParams: Params =
#signature(factory).params.build(createParameter)
return factory(pParams)
}
}
func createParameter<Parameter>() -> Parameter {
fatalError("Somehow")
}
Any thoughts?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160124/4a3a9d70/attachment.html>
More information about the swift-evolution
mailing list