When to use assert in client & common GWT code
问题 There are several questions on StackOverflow discussing the question of when one should use an assert statement versus throwing some exception. (Examples here, here, here, here, and here. However, I have come to suspect that the conventional wisdom of assert-versus-throw is based upon the assumption that you are running within a JVM. In the GWT universe, where your Java gets transliterated to JavaScript and runs in the context of a browser, the set of tradeoffs feels different: asserts are