How could a FailFast-library work?

What is Fail Fast? 

Why a FailFast-library?

  • It could leverage a lot of nice checks that you don't bother writing your self (think NUnit Assert-method).
  • It could throw a FailFastException that is different from exception types that are normal catched e.g. argument and state exceptions.
  • It could have sanity checks... e.g. was that a field null that you turned into a NullArgumentException?
  • It could help standardize the fail-fast principle.
  • It could extendable for you to add your own types, checks and fails.
  • It could be performance tested.
  • It could be well-tested.
  • It will be open source.
  • ...

How would I use it?

Your Feedback

Any feedback is greatly appreciated! 
  1. Did you know about the fail-fast principle?
  2. Do you or would you use the principle?
  3. Are you interested in using a FailFast-library as outlined above?
  4. Do you have any ideas or concerns?

... and thank you for reading!


  1. Hibernate Validator is a good example in the Java world.

  2. @Mike: Thanks! I didn't know about that (just read http://java.dzone.com/articles/using-hibernate-validator).
    A very nice way of validating properties of a whole object.
    Might be a bigger mouthful than I had in mind... have to think about that.

    1. Hmnn... I want those annotations.