I've become fond of using the @assert macro for checking input to functions, e.g.
@assert size(A) == size(B) @assert x > 0 Now I've read discussions like https://github.com/JuliaLang/julia/issues/10614 where I see that this not recommended and that @assert is slow. What is then the "right" Julian way that isn't slowing things down? Something like size(A) != size(B) && throw(ArgumentError()) x <= 0 && throw(DomainError())
