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

No comments:

Post a Comment