What is Fail Fast?
Short intro: http://en.wikipedia.org/wiki/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!
- Did you know about the fail-fast principle?
- Do you or would you use the principle?
- Are you interested in using a FailFast-library as outlined above?
- Do you have any ideas or concerns?
... and thank you for reading!
Hibernate Validator is a good example in the Java world.
ReplyDelete@Mike: Thanks! I didn't know about that (just read http://java.dzone.com/articles/using-hibernate-validator).
ReplyDeleteA 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.
Hmnn... I want those annotations.
Delete