On Jan 28, 2:42 pm, David Zhou <da...@nodnod.net> wrote: > And for the something, you say: "blow up or do nothing or return false > or something".
Well, I wouldn't actually recommend "blowing up" as the best choice, it was just an example. :) Perhaps it would be better to do nothing, but hopefully the code will never get to that block because the user was able to detect up-front that this particular feature would not run correctly and therefor wouldn't call it. It's really a design decision at that point, of what to do when the code realizes it cannot succeed. But it is definitely preferable to _know_ that you are not going to succeed and do something, vs applying a fix blindly and assuming it worked. > It seems like you're claiming that falling back naively to alternate > is bad because things could break, beyond visual artifacts. And yet, > it's acceptable to "blow up" in your ultimate else clause? Falling back to a particular fix just because the standard way didn't work is just plain faulty logic. It's just waiting to fail. Intentionally falling into an "else" clause and designing a proper handling mechanism is the better approach. Matt Kruse --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---