jthomas commented on issue #23: Add Codable Support for Swift 4.x
   I've been testing out Codable support from the sample above in my library 
for wrapping Swift actions to produce binaries.
   It's all working great but I made a few changes to improve the developer 
experience that we'd probably want to include. Here are the things I found....
   - Support `@escaping` closures to allow users to use with async calls.
   func _run_main<In: Codable, Out: Codable>(mainFunction: (In, @escaping 
(Out?, Error?) -> Void) -> Void) {
   This just needs the annotation adding and doesn't affect existing code or 
people who don't use that.
   - Improved error handled to give more descriptive messages, e.g.
   This helps the user understand when there has been problems using the 
Codable API versus something else.
   - Sync method style APIs should probably support throws. This enables uses 
to use normal error handling to surface issues.
   I'm away on vacation for a week but will attempt to push a PR when I return.

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

Reply via email to