News for hackers. Stuff that matters.
Re:Alamofire: HTTP Networking in Swift by mythz on Thursday September 25, 2014 @03:34PM (#8369239)
Looks like a great lib with a nice API, thx.

Was there any reason why you chose callbacks over a Promise-like pattern for the async responses?

Also do you know of any good HTTP Server libraries that will let you develop simple HTTP JSON services in Swift?

Re:Alamofire: HTTP Networking in Swift by wahnfrieden on Thursday September 25, 2014 @04:16PM (#8369494)
See Moya for a lib built on top of AlamoFire that adds reactive signals (fulfilling the promises use case): https://github.com/AshFurrow/Moya
Re:Alamofire: HTTP Networking in Swift by matttthompson on Thursday September 25, 2014 @04:40PM (#8369626)
> Was there any reason why you chose callbacks over a Promise-like pattern for the async responses?

Deeply-nested networking callbacks are a code smell, and I find that promises often do more harm by hiding those smells—or worse, obscuring the flow itself. In practice, Alamofire is mostly going to be single or at most nested two levels deep anyway.