-
@testis very slow and for tests. -
@assertis for double-checking invariants you are certaint are true. The only way it can fire, is when there are bugs in the program. E.g.
# good
y = _my_fast_sum_of_squares(xs)
@assert y >= 0
# bad
function public_api(x)
@assert x >= 0
end
- ArgCheck.jl is specifically designed for fast argument checks with nice error messages.