HwanJoonChoi.com

HwanJoonChoi.com

Dec 25 / 11:44pm

fall through case sucks

ugh just wasted an hour tracking down a bug (Objective-C), only to realize i left out a break statement between two case blocks. this ended up looping between the two cases.  i seem to recall someone telling me i should avoid switch statements at all cost, because it offers very little benefit (and these bugs are bound to happen). ruby got it right with their "when 1,2,3" style switch statements.

on a plus side, i found a royalty-free (donation based) music archive. has a pretty decent collection of reggae music, so i guess i'll be makin g a

0 comments

Leave a comment...

 
To leave a comment on this posterous, please login by clicking one of the following.
Posterous-login     twitter