e.g I have several Julia functions with a custom check
function foo(x)
check_greater_than(0, x)
# do something
end
What is the canonical way to remove the check globally? I know one way to do it, is to define the check function as
function check_greater_than(b, x)
if !haskey(ENV, "RELEASE")
x > b || error("not greater than $b")
end
true
end
Is there any compiler option like --release=true
? or will there be such a compiler option? And is it possible to use --check-bounds=no
?