initial commit

Mamy Ratsimbazafy 2018-07-02 23:06:57 +02:00
parent 2eb83e62c1
commit dcbced4a0a

9
Exceptions-and-errors.md Normal file

@ -0,0 +1,9 @@
[Draft]
1) We start actively discriminating between recoverable and non-recoverable errors when we discuss things.
2) We mainly use asserts (particularly `doAssert`) when we are trying to detect non-recoverable errors in the code. Most APIs should be rather strict about their inputs.
3) We bless the use of both exceptions and error codes for recoverable errors (the more appropriate is selected on a case-by-case basis). We make an active effort to document the recoverable errors of each API when we design it.
4) We gradually introduce the helpers from my proposal to turn the documented APIs into compiler-checked specifications.