Last active
August 29, 2015 14:15
-
-
Save lifely/0005075d9ba80e827827 to your computer and use it in GitHub Desktop.
Fail or Continue - Paradigme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSArray *developerList = nil; | |
if (!responseObject || !(developerList = [responseObject objectForKey:@"list"]) || | |
![developerList isKindOfClass:[NSArray class]]) | |
return ; // call error/failure block | |
NSArray *developers = [SFService prepareObjectFromResponse:developerList forObjectClass:[SFDeveloper class]]; | |
NSLog(@"[SUCCESS][SFService-api] Action /trombi/ : \n%@", developers); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Three years later, lifely replies !
So, i agree with what you were saying and it's all fine. However the code on this gist was more of an concept example than a real issue.
I was mostly referring about the way to organise, the flow of your code. In order to achieve a more linear reading experience, i usually write my code like the above :
I have moved on a little with swift and have more background on it now, so i see what i was doing wrong and what can be done now, i still have to figure some things but i have time.
However i'll point out one link: http://ericasadun.com/2015/02/16/swift-linearizing-code/ by erica sadun, it's exactly what i was trying to reproduce and she probably explain it better than i do.
Thanks, cc @apouche