Re: Any way to get a warning if a non-boolean type is used in an if expression?
Re: Any way to get a warning if a non-boolean type is used in an if expression?
- Subject: Re: Any way to get a warning if a non-boolean type is used in an if expression?
- From: Luther Baker <email@hidden>
- Date: Thu, 17 Oct 2013 23:45:03 -0500
Hey, aren't we forgetting something here! The real reason we write software and the real reason we use objective-c. We are software programmers that like OO ... and, we like our code close to the metal! I left Java - I'm really not looking to find it's constructs here ... but!!!!! Language, shmanguage ... if you don't mind being a bit verbose and your real end goal is to never make the mistake again, why don't you just roll your own family of class functions? Take a look at the [UIView animate ....] family. Your methods could explicitly require two arguments and one or two blocks ...
[IF a:obj1 equalsB:obj2 then:^{ ... } else:^{ ... }]
and more ...
[IF a:obj1 equalsB:obj2 then:^{ ... }]
[WHILE a:obj1 equalsB:obj2 do:^{ ... }]
[WHILE a:obj1 doesNotEqualB:obj2 do:^{ ... }]
and even ...
[UNLESS a:obj1 equalsB:obj2 do:^{ ... }]
... Going all 'smalltalk'ian :)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden