But it is impossible to enforce that code be run with assertions enabled in any given foreign environment.
On Fri, May 29, 2015 at 7:56 AM, Aditya <[email protected]> wrote: > It is trivial to enable Java assertion for all code executed from within > eclipse by modifying the JRE settings[1]. > > > [1] > > http://stackoverflow.com/questions/11415160/how-to-enable-the-java-keyword-assert-in-eclipse-program-wise#answer-21786986 > > On Fri, May 29, 2015 at 2:47 AM, Ted Dunning <[email protected]> > wrote: > > > On Thu, May 28, 2015 at 11:44 AM, Chris Westin <[email protected]> > > wrote: > > > > > I'm beginning to think we should go the Google route and not allow Java > > > assert anywhere, instead always throwing real exceptions (possibly > > > indirectly by using the Preconditions package). But I'm not quite ready > > to > > > go there yet. For now I'll stick to asking that we not use Java assert > in > > > tests and test support code. > > > > > > > The one use of assert that I still find interesting is to signal IDE's > that > > a particularly invariant is known to be true. > > > > This is a weak argument, however. > > >
